{
  "id": 198377,
  "title": "Why they are many more PyTorch notebooks than TF",
  "url": "/competitions/cassava-leaf-disease-classification/discussion/198377",
  "author_name": "huguli maguli",
  "post_date": "2020-11-20T22:38:03.901000",
  "votes": 5,
  "comment_count": 18,
  "views": 0,
  "content": "<p>I wonder if this is a good place to hear why given so much changes and progress in TF2 still people prefer PyTorch !</p>",
  "messages": [
    {
      "id": 1085473,
      "postDate": "2020-11-20T22:38:03.900Z",
      "content": "<p>I wonder if this is a good place to hear why given so much changes and progress in TF2 still people prefer PyTorch !</p>",
      "rawMarkdown": "I wonder if this is a good place to hear why given so much changes and progress in TF2 still people prefer PyTorch !",
      "votes": 5
    },
    {
      "id": 1086952,
      "postDate": "2020-11-22T07:59:28.930Z",
      "content": "<p>The things such customization and flexibility that some people are talking about PyTorch over TensorFlow 1.x is reasonable. But with the release of TensorFlow 2.x, the gap between PyTorch and TensorFlow becomes narrower than ever.  Top of that, one of the main attractions of TensorFlow 2.x is the integration of Keras. Generally, there are some people who make an arrogant speech to justify their favorite framework, IMO, that's totally nonsense. </p>\n<p>However, I would like to say a silent truth about the popularity of any framework in a competition, <strong>If anyone shares high scored kernel in TensorFlow, PyTorch, Fast.ai, or whatever, I think that would be popular</strong></p>",
      "rawMarkdown": "The things such customization and flexibility that some people are talking about PyTorch over TensorFlow 1.x is reasonable. But with the release of TensorFlow 2.x, the gap between PyTorch and TensorFlow becomes narrower than ever.  Top of that, one of the main attractions of TensorFlow 2.x is the integration of Keras. Generally, there are some people who make an arrogant speech to justify their favorite framework, IMO, that's totally nonsense. \n\nHowever, I would like to say a silent truth about the popularity of any framework in a competition, **If anyone shares high scored kernel in TensorFlow, PyTorch, Fast.ai, or whatever, I think that would be popular**",
      "votes": 3,
      "replies": [
        {
          "id": 1091185,
          "postDate": "2020-11-25T20:44:49.790Z",
          "content": "<p>well said - another question - may be off topic - but is there any book you have read or course focusing on TF2 for someone who is NOT a beginner !?</p>",
          "rawMarkdown": "well said - another question - may be off topic - but is there any book you have read or course focusing on TF2 for someone who is NOT a beginner !?"
        }
      ]
    },
    {
      "id": 1086283,
      "postDate": "2020-11-21T14:46:45.557Z",
      "content": "<p>Pytorch gives way much more flexibility to do your customized stuff. </p>\n<p>You can still achieve some flexibility with TF/keras but the code may quickly be verbose and quirky</p>",
      "rawMarkdown": "Pytorch gives way much more flexibility to do your customized stuff. \n\nYou can still achieve some flexibility with TF/keras but the code may quickly be verbose and quirky",
      "votes": 3,
      "replies": [
        {
          "id": 1086649,
          "postDate": "2020-11-21T22:20:44.200Z",
          "content": "<p>sorry to sound arrogant - but is there any solid review demonstrating this ? or rather a personal preference ? because I know people who claim TF2 (not earliers) are way easier for customization :D - again I don't know - I am not an advanced level user in either, but would like to make a decision and stick to it :)</p>",
          "rawMarkdown": "sorry to sound arrogant - but is there any solid review demonstrating this ? or rather a personal preference ? because I know people who claim TF2 (not earliers) are way easier for customization :D - again I don't know - I am not an advanced level user in either, but would like to make a decision and stick to it :)",
          "votes": 1
        },
        {
          "id": 1086965,
          "postDate": "2020-11-22T08:20:25.663Z",
          "content": "<p>I would say  personal preference !  Just like those people telling you that TF2 is easier to customize ^^</p>\n<p>Here we have classification, but it's particularly relevant (for me) for advanced detection/segmentation/NLP/Q&amp;A  where TF can be quickly cumbersome  to have competitive results. </p>\n<p>I used TF 1.x  during Google Quest   and TGS Segmentation competitions before switching to Pytorch in order to get better results quickly.  Simply because it was much easier to try out new ideas quickly or to integrate github codes from new papers in my framework with Pytorch</p>",
          "rawMarkdown": "I would say  personal preference !  Just like those people telling you that TF2 is easier to customize ^^\n\nHere we have classification, but it's particularly relevant (for me) for advanced detection/segmentation/NLP/Q&A  where TF can be quickly cumbersome  to have competitive results. \n\nI used TF 1.x  during Google Quest   and TGS Segmentation competitions before switching to Pytorch in order to get better results quickly.  Simply because it was much easier to try out new ideas quickly or to integrate github codes from new papers in my framework with Pytorch",
          "votes": 1
        }
      ]
    },
    {
      "id": 1088295,
      "postDate": "2020-11-23T14:03:16.027Z",
      "content": "<p>personally I prefer tensorflow 2 because writing predictive models with it seems more intuitive to me</p>",
      "rawMarkdown": "personally I prefer tensorflow 2 because writing predictive models with it seems more intuitive to me",
      "votes": 1
    },
    {
      "id": 1085589,
      "postDate": "2020-11-21T02:22:40.853Z",
      "content": "<p>Customization with PyTorch is wayyy much easier than TF. I have been using TF for 2 years, and currently learning PT for better customization. There's no winner though. They are just different APIs.</p>",
      "rawMarkdown": "Customization with PyTorch is wayyy much easier than TF. I have been using TF for 2 years, and currently learning PT for better customization. There's no winner though. They are just different APIs.",
      "votes": 1,
      "replies": [
        {
          "id": 1086153,
          "postDate": "2020-11-21T12:43:44.347Z",
          "content": "<p>i understand - but have you tried TF2 ? </p>",
          "rawMarkdown": "i understand - but have you tried TF2 ? ",
          "votes": 1
        },
        {
          "id": 1086303,
          "postDate": "2020-11-21T15:03:57.250Z",
          "content": "<p>I am still using TF 2.x, at least now 2.3. If you want to declare custom loss functions, layers, models, etc… it is way easier in PT.</p>",
          "rawMarkdown": "I am still using TF 2.x, at least now 2.3. If you want to declare custom loss functions, layers, models, etc... it is way easier in PT.",
          "votes": 1
        }
      ]
    },
    {
      "id": 1085492,
      "postDate": "2020-11-20T23:15:24.873Z",
      "content": "<p>Personally, I thought there were more TF2 notebooks rather than PyTorch. I haven't been able to experiment with much TF2 yet, so maybe that's the reason for my perspective. Anyways, which do you prefer?</p>",
      "rawMarkdown": "Personally, I thought there were more TF2 notebooks rather than PyTorch. I haven't been able to experiment with much TF2 yet, so maybe that's the reason for my perspective. Anyways, which do you prefer?",
      "votes": 1
    },
    {
      "id": 1086298,
      "postDate": "2020-11-21T14:57:23.710Z",
      "content": "<p>Here is my TF:<br>\n<a href=\"https://www.kaggle.com/wuliaokaola/getting-started-tpus-new-tfrecords\" target=\"_blank\">https://www.kaggle.com/wuliaokaola/getting-started-tpus-new-tfrecords</a></p>",
      "rawMarkdown": "Here is my TF:\nhttps://www.kaggle.com/wuliaokaola/getting-started-tpus-new-tfrecords",
      "votes": 2,
      "replies": [
        {
          "id": 1087798,
          "postDate": "2020-11-23T04:53:26.907Z",
          "content": "<p>i am using tf. i have trained my model on pycharm and upload the file.h5 on notebook. now problem is submission is failed. can you help out?<br>\ni am attaching some screen shots</p>",
          "rawMarkdown": "i am using tf. i have trained my model on pycharm and upload the file.h5 on notebook. now problem is submission is failed. can you help out?\ni am attaching some screen shots"
        }
      ]
    },
    {
      "id": 1086516,
      "postDate": "2020-11-21T18:40:15.180Z",
      "content": "<p><a href=\"https://www.kaggle.com/huhulimaguli\" target=\"_blank\">@huhulimaguli</a> The usage of TensorFlow increased exponentially ever since TF 2.0 released in late 2019 . Since Pytorch was very much easier to use in comparison with TF 1x , it has advantage of being early . Ever since datasets are released in TF Record formats in Kaggle combined with TPU usage , TF usage is on the rise . I saw even crazy addicts of PT release notebooks in TF 2.0 and TPU . It will take some time , but its definitely increasing day by day.</p>",
      "rawMarkdown": "@huhulimaguli The usage of TensorFlow increased exponentially ever since TF 2.0 released in late 2019 . Since Pytorch was very much easier to use in comparison with TF 1x , it has advantage of being early . Ever since datasets are released in TF Record formats in Kaggle combined with TPU usage , TF usage is on the rise . I saw even crazy addicts of PT release notebooks in TF 2.0 and TPU . It will take some time , but its definitely increasing day by day.",
      "votes": 1,
      "replies": [
        {
          "id": 1086648,
          "postDate": "2020-11-21T22:19:03.267Z",
          "content": "<p>I have used both but I am not an expert in either - it is always depends on the project/case and see what is already there to go and improve - but I have been loving TF2 so much. I am also aiming to finally decide to be come expert in either - doing more advanced stuff - but so far has been very difficult choice. Also, I think, both lacking books/material for advanced level users</p>",
          "rawMarkdown": "I have used both but I am not an expert in either - it is always depends on the project/case and see what is already there to go and improve - but I have been loving TF2 so much. I am also aiming to finally decide to be come expert in either - doing more advanced stuff - but so far has been very difficult choice. Also, I think, both lacking books/material for advanced level users",
          "votes": 1
        }
      ]
    },
    {
      "id": 1085728,
      "postDate": "2020-11-21T06:41:40.927Z",
      "rawMarkdown": "",
      "votes": 2,
      "isDeleted": true,
      "replies": [
        {
          "id": 1086288,
          "postDate": "2020-11-21T14:49:03.690Z",
          "content": "<p>I've never used fast.ai   and I don't think vanilla Pytorch is that much more difficult to use than fast.ai ^^</p>",
          "rawMarkdown": "I've never used fast.ai   and I don't think vanilla Pytorch is that much more difficult to use than fast.ai ^^"
        },
        {
          "id": 1086440,
          "postDate": "2020-11-21T17:25:52.607Z",
          "rawMarkdown": "",
          "votes": 1,
          "isDeleted": true
        },
        {
          "id": 1087167,
          "postDate": "2020-11-22T12:26:33.673Z",
          "content": "<p>i think catalyst or PL is better than fastai. We love Pytorch because that flexable not fastai</p>",
          "rawMarkdown": "i think catalyst or PL is better than fastai. We love Pytorch because that flexable not fastai"
        }
      ]
    }
  ],
  "comments": [
    {
      "id": 1086952,
      "author_name": "Innat",
      "author_url": "",
      "post_date": "2020-11-22T07:59:28.930000",
      "content": "<p>The things such customization and flexibility that some people are talking about PyTorch over TensorFlow 1.x is reasonable. But with the release of TensorFlow 2.x, the gap between PyTorch and TensorFlow becomes narrower than ever.  Top of that, one of the main attractions of TensorFlow 2.x is the integration of Keras. Generally, there are some people who make an arrogant speech to justify their favorite framework, IMO, that's totally nonsense. </p>\n<p>However, I would like to say a silent truth about the popularity of any framework in a competition, <strong>If anyone shares high scored kernel in TensorFlow, PyTorch, Fast.ai, or whatever, I think that would be popular</strong></p>",
      "votes": 3,
      "replies": [
        {
          "id": 1091185,
          "author_name": "huguli maguli",
          "author_url": "",
          "post_date": "2020-11-25T20:44:49.790000",
          "content": "<p>well said - another question - may be off topic - but is there any book you have read or course focusing on TF2 for someone who is NOT a beginner !?</p>",
          "votes": 0,
          "replies": []
        }
      ]
    },
    {
      "id": 1086283,
      "author_name": "Serigne ",
      "author_url": "",
      "post_date": "2020-11-21T14:46:45.557000",
      "content": "<p>Pytorch gives way much more flexibility to do your customized stuff. </p>\n<p>You can still achieve some flexibility with TF/keras but the code may quickly be verbose and quirky</p>",
      "votes": 3,
      "replies": [
        {
          "id": 1086649,
          "author_name": "huguli maguli",
          "author_url": "",
          "post_date": "2020-11-21T22:20:44.200000",
          "content": "<p>sorry to sound arrogant - but is there any solid review demonstrating this ? or rather a personal preference ? because I know people who claim TF2 (not earliers) are way easier for customization :D - again I don't know - I am not an advanced level user in either, but would like to make a decision and stick to it :)</p>",
          "votes": 1,
          "replies": []
        },
        {
          "id": 1086965,
          "author_name": "Serigne ",
          "author_url": "",
          "post_date": "2020-11-22T08:20:25.663000",
          "content": "<p>I would say  personal preference !  Just like those people telling you that TF2 is easier to customize ^^</p>\n<p>Here we have classification, but it's particularly relevant (for me) for advanced detection/segmentation/NLP/Q&amp;A  where TF can be quickly cumbersome  to have competitive results. </p>\n<p>I used TF 1.x  during Google Quest   and TGS Segmentation competitions before switching to Pytorch in order to get better results quickly.  Simply because it was much easier to try out new ideas quickly or to integrate github codes from new papers in my framework with Pytorch</p>",
          "votes": 1,
          "replies": []
        }
      ]
    },
    {
      "id": 1088295,
      "author_name": "ZOULLA BILO'O Daniel",
      "author_url": "",
      "post_date": "2020-11-23T14:03:16.027000",
      "content": "<p>personally I prefer tensorflow 2 because writing predictive models with it seems more intuitive to me</p>",
      "votes": 1,
      "replies": []
    },
    {
      "id": 1085589,
      "author_name": "Long Luu",
      "author_url": "",
      "post_date": "2020-11-21T02:22:40.853000",
      "content": "<p>Customization with PyTorch is wayyy much easier than TF. I have been using TF for 2 years, and currently learning PT for better customization. There's no winner though. They are just different APIs.</p>",
      "votes": 1,
      "replies": [
        {
          "id": 1086153,
          "author_name": "huguli maguli",
          "author_url": "",
          "post_date": "2020-11-21T12:43:44.347000",
          "content": "<p>i understand - but have you tried TF2 ? </p>",
          "votes": 1,
          "replies": []
        },
        {
          "id": 1086303,
          "author_name": "Long Luu",
          "author_url": "",
          "post_date": "2020-11-21T15:03:57.250000",
          "content": "<p>I am still using TF 2.x, at least now 2.3. If you want to declare custom loss functions, layers, models, etc… it is way easier in PT.</p>",
          "votes": 1,
          "replies": []
        }
      ]
    },
    {
      "id": 1085492,
      "author_name": "Sean Burgess",
      "author_url": "",
      "post_date": "2020-11-20T23:15:24.873000",
      "content": "<p>Personally, I thought there were more TF2 notebooks rather than PyTorch. I haven't been able to experiment with much TF2 yet, so maybe that's the reason for my perspective. Anyways, which do you prefer?</p>",
      "votes": 1,
      "replies": []
    },
    {
      "id": 1086298,
      "author_name": "Johnny Lee",
      "author_url": "",
      "post_date": "2020-11-21T14:57:23.710000",
      "content": "<p>Here is my TF:<br>\n<a href=\"https://www.kaggle.com/wuliaokaola/getting-started-tpus-new-tfrecords\" target=\"_blank\">https://www.kaggle.com/wuliaokaola/getting-started-tpus-new-tfrecords</a></p>",
      "votes": 2,
      "replies": [
        {
          "id": 1087798,
          "author_name": "M.Talha Arshad",
          "author_url": "",
          "post_date": "2020-11-23T04:53:26.907000",
          "content": "<p>i am using tf. i have trained my model on pycharm and upload the file.h5 on notebook. now problem is submission is failed. can you help out?<br>\ni am attaching some screen shots</p>",
          "votes": 0,
          "replies": []
        }
      ]
    },
    {
      "id": 1086516,
      "author_name": "Tensor Girl",
      "author_url": "",
      "post_date": "2020-11-21T18:40:15.180000",
      "content": "<p><a href=\"https://www.kaggle.com/huhulimaguli\" target=\"_blank\">@huhulimaguli</a> The usage of TensorFlow increased exponentially ever since TF 2.0 released in late 2019 . Since Pytorch was very much easier to use in comparison with TF 1x , it has advantage of being early . Ever since datasets are released in TF Record formats in Kaggle combined with TPU usage , TF usage is on the rise . I saw even crazy addicts of PT release notebooks in TF 2.0 and TPU . It will take some time , but its definitely increasing day by day.</p>",
      "votes": 1,
      "replies": [
        {
          "id": 1086648,
          "author_name": "huguli maguli",
          "author_url": "",
          "post_date": "2020-11-21T22:19:03.267000",
          "content": "<p>I have used both but I am not an expert in either - it is always depends on the project/case and see what is already there to go and improve - but I have been loving TF2 so much. I am also aiming to finally decide to be come expert in either - doing more advanced stuff - but so far has been very difficult choice. Also, I think, both lacking books/material for advanced level users</p>",
          "votes": 1,
          "replies": []
        }
      ]
    },
    {
      "id": 1085728,
      "author_name": "",
      "author_url": "",
      "post_date": "2020-11-21T06:41:40.927000",
      "content": "",
      "votes": 2,
      "replies": [
        {
          "id": 1086288,
          "author_name": "Serigne ",
          "author_url": "",
          "post_date": "2020-11-21T14:49:03.690000",
          "content": "<p>I've never used fast.ai   and I don't think vanilla Pytorch is that much more difficult to use than fast.ai ^^</p>",
          "votes": 0,
          "replies": []
        },
        {
          "id": 1086440,
          "author_name": "",
          "author_url": "",
          "post_date": "2020-11-21T17:25:52.607000",
          "content": "",
          "votes": 1,
          "replies": []
        },
        {
          "id": 1087167,
          "author_name": "Manh Lab",
          "author_url": "",
          "post_date": "2020-11-22T12:26:33.673000",
          "content": "<p>i think catalyst or PL is better than fastai. We love Pytorch because that flexable not fastai</p>",
          "votes": 0,
          "replies": []
        }
      ]
    }
  ],
  "raw_markdown_by_id": {
    "1085473": "I wonder if this is a good place to hear why given so much changes and progress in TF2 still people prefer PyTorch !",
    "1086952": "The things such customization and flexibility that some people are talking about PyTorch over TensorFlow 1.x is reasonable. But with the release of TensorFlow 2.x, the gap between PyTorch and TensorFlow becomes narrower than ever.  Top of that, one of the main attractions of TensorFlow 2.x is the integration of Keras. Generally, there are some people who make an arrogant speech to justify their favorite framework, IMO, that's totally nonsense. \n\nHowever, I would like to say a silent truth about the popularity of any framework in a competition, **If anyone shares high scored kernel in TensorFlow, PyTorch, Fast.ai, or whatever, I think that would be popular**",
    "1086283": "Pytorch gives way much more flexibility to do your customized stuff. \n\nYou can still achieve some flexibility with TF/keras but the code may quickly be verbose and quirky",
    "1088295": "personally I prefer tensorflow 2 because writing predictive models with it seems more intuitive to me",
    "1085589": "Customization with PyTorch is wayyy much easier than TF. I have been using TF for 2 years, and currently learning PT for better customization. There's no winner though. They are just different APIs.",
    "1085492": "Personally, I thought there were more TF2 notebooks rather than PyTorch. I haven't been able to experiment with much TF2 yet, so maybe that's the reason for my perspective. Anyways, which do you prefer?",
    "1086298": "Here is my TF:\nhttps://www.kaggle.com/wuliaokaola/getting-started-tpus-new-tfrecords",
    "1086516": "@huhulimaguli The usage of TensorFlow increased exponentially ever since TF 2.0 released in late 2019 . Since Pytorch was very much easier to use in comparison with TF 1x , it has advantage of being early . Ever since datasets are released in TF Record formats in Kaggle combined with TPU usage , TF usage is on the rise . I saw even crazy addicts of PT release notebooks in TF 2.0 and TPU . It will take some time , but its definitely increasing day by day.",
    "1085728": ""
  }
}