{
  "id": 243111,
  "title": "PyTorch vs TensorFlow",
  "url": "/competitions/siim-covid19-detection/discussion/243111",
  "author_name": "cool_rabbit",
  "post_date": "2021-06-01T07:31:49.205000",
  "votes": 15,
  "comment_count": 29,
  "views": 0,
  "content": "<p>There seems to be some LB score gap between PyTorch and TensorFlow (PyTorch &lt; TensorFlow).</p>\n<p>My PyTorch notebook (EFB7 single fold, size=512)→0.354<br>\nPublic TensorFlow notebook (EFB7 single fold, size=600)→0.379</p>\n<p>Lots of experiments done, but never reach 0.370 by simple PyTorch model (without PP or more augmentations).</p>\n<p>Does anyone has the similar experience here?<br>\nJust size difference?<br>\nOr my fault?</p>",
  "messages": [
    {
      "id": 1330958,
      "postDate": "2021-06-01T07:31:49.207Z",
      "content": "<p>There seems to be some LB score gap between PyTorch and TensorFlow (PyTorch &lt; TensorFlow).</p>\n<p>My PyTorch notebook (EFB7 single fold, size=512)→0.354<br>\nPublic TensorFlow notebook (EFB7 single fold, size=600)→0.379</p>\n<p>Lots of experiments done, but never reach 0.370 by simple PyTorch model (without PP or more augmentations).</p>\n<p>Does anyone has the similar experience here?<br>\nJust size difference?<br>\nOr my fault?</p>",
      "rawMarkdown": "There seems to be some LB score gap between PyTorch and TensorFlow (PyTorch < TensorFlow).\n\nMy PyTorch notebook (EFB7 single fold, size=512)→0.354\nPublic TensorFlow notebook (EFB7 single fold, size=600)→0.379\n\nLots of experiments done, but never reach 0.370 by simple PyTorch model (without PP or more augmentations).\n\nDoes anyone has the similar experience here?\nJust size difference?\nOr my fault?",
      "votes": 15
    },
    {
      "id": 1577730,
      "postDate": "2021-11-10T10:53:09.693Z",
      "content": "<p><strong>The following are the most significant distinctions between PyTorch and TensorFlow.</strong> </p>\n<p>Because of the different coding styles that these frameworks encourage, <a href=\"https://www.learnbay.co/data-science-course/\" target=\"_blank\">PyTorch may be easier to use than TensorFlow if you're already a Python coder</a>.</p>\n<p>In a 2017 essay for Towards Data Science, Kirill Dubovikov, the CTO of Cinimex DataLab, lays down some of these discrepancies. TensorFlow, according to Dubovikov, \"feels more like a library than a framework\" since \"all operations are quite low-level and you will need to write a lot of boilerplate code even if you don't want to.\" While TensorFlow offers abstractions that can help you write less boilerplate code, PyTorch's more Pythonic and imperative programming style may make it feel more obvious and user-friendly.</p>\n<p>However, certain aspects of the framework may make TensorFlow more appealing in specific cases.<br>\nDashboards and data visualization<br>\nTensorFlow contains TensorBoard, a visualization framework for displaying data dashboards. PyTorch has its own visualization toolkit, Visdom, however, it isn't as comprehensive as TensorBoard. TensorBoard is also integrated with PyTorch.</p>\n<p><strong>Deployment and Scalability</strong><br>\nTensorFlow considers scalability. As a result, large-scale applications that need the usage of several servers may find the TensorFlow framework to be easier to handle.</p>\n<p>TensorFlow models have traditionally been easier to deploy on browsers and phones using TensorFlow Extended (TFX), TensorFlow's deployment infrastructure, than PyTorch ML models. TensorFlow also made deployment easier in general.</p>\n<p>This changed in 2020, when TorchServe, a tool for serving PyTorch models, was released. The tool isn't as complicated as TFX, but it does offer a flexible and simple deployment mechanism.</p>\n<p><strong>Data Parallelism</strong><br>\nParallelism implementation is also a significant distinction between the two frameworks. PyTorch improves speed by taking advantage of <a href=\"https://www.learnbay.co/data-science-course/data-science-course-in-bangalore/\" target=\"_blank\">Python's</a> asynchronous execution capabilities, which allows you to distribute training across numerous GPUs with a single line of code. With TensorFlow, you'll have to do it manually, which means more code will be written.</p>\n<p>PyTorch is the more \"user-friendly\" of the two frameworks, and its design makes it ideal for quick solutions and smaller applications. TensorFlow has some capabilities that make it ideal for larger groups, particularly enterprise machine learning researchers.</p>\n<p>The framework's toolbox for deploying models on both mobile devices and servers is one of the reasons it was deemed the best option for <a href=\"https://www.learnbay.co/\" target=\"_blank\">machine-learning firms</a>. Over the last few years, though, modifications to PyTorch have made it a far more attractive commercial option.</p>",
      "rawMarkdown": "**The following are the most significant distinctions between PyTorch and TensorFlow.** \n\nBecause of the different coding styles that these frameworks encourage, [PyTorch may be easier to use than TensorFlow if you're already a Python coder](https://www.learnbay.co/data-science-course/).\n\nIn a 2017 essay for Towards Data Science, Kirill Dubovikov, the CTO of Cinimex DataLab, lays down some of these discrepancies. TensorFlow, according to Dubovikov, \"feels more like a library than a framework\" since \"all operations are quite low-level and you will need to write a lot of boilerplate code even if you don't want to.\" While TensorFlow offers abstractions that can help you write less boilerplate code, PyTorch's more Pythonic and imperative programming style may make it feel more obvious and user-friendly.\n\nHowever, certain aspects of the framework may make TensorFlow more appealing in specific cases.\nDashboards and data visualization\nTensorFlow contains TensorBoard, a visualization framework for displaying data dashboards. PyTorch has its own visualization toolkit, Visdom, however, it isn't as comprehensive as TensorBoard. TensorBoard is also integrated with PyTorch.\n\n**Deployment and Scalability**\nTensorFlow considers scalability. As a result, large-scale applications that need the usage of several servers may find the TensorFlow framework to be easier to handle.\n\nTensorFlow models have traditionally been easier to deploy on browsers and phones using TensorFlow Extended (TFX), TensorFlow's deployment infrastructure, than PyTorch ML models. TensorFlow also made deployment easier in general.\n\nThis changed in 2020, when TorchServe, a tool for serving PyTorch models, was released. The tool isn't as complicated as TFX, but it does offer a flexible and simple deployment mechanism.\n\n**Data Parallelism**\nParallelism implementation is also a significant distinction between the two frameworks. PyTorch improves speed by taking advantage of [Python's](https://www.learnbay.co/data-science-course/data-science-course-in-bangalore/) asynchronous execution capabilities, which allows you to distribute training across numerous GPUs with a single line of code. With TensorFlow, you'll have to do it manually, which means more code will be written.\n\nPyTorch is the more \"user-friendly\" of the two frameworks, and its design makes it ideal for quick solutions and smaller applications. TensorFlow has some capabilities that make it ideal for larger groups, particularly enterprise machine learning researchers.\n\nThe framework's toolbox for deploying models on both mobile devices and servers is one of the reasons it was deemed the best option for [machine-learning firms](https://www.learnbay.co/). Over the last few years, though, modifications to PyTorch have made it a far more attractive commercial option.\n",
      "votes": 1
    },
    {
      "id": 1331245,
      "postDate": "2021-06-01T11:10:30.447Z",
      "content": "<p>What about <strong>CV</strong>? Did you also check that?</p>",
      "rawMarkdown": "What about **CV**? Did you also check that?",
      "votes": 1,
      "replies": [
        {
          "id": 1331265,
          "postDate": "2021-06-01T11:21:43.270Z",
          "content": "<p>I didn't check TF's.<br>\nCV 0.350 for PyTorch.</p>",
          "rawMarkdown": "I didn't check TF's.\nCV 0.350 for PyTorch.",
          "votes": 1
        },
        {
          "id": 1331666,
          "postDate": "2021-06-01T16:07:46.450Z",
          "content": "<p>The following is a CV from public 0.383 note. Considering the amount of data, I feel it is dangerous to refer to single model scores.</p>\n<pre><code>fold0: 0.3458651210067351\nfold1: 0.3462990692608105\nfold2: 0.36251980945990336\nfold3: 0.37588818359535553\nfold4: 0.34007067817549164\nmean: 0.3541285722996592\n</code></pre>",
          "rawMarkdown": "The following is a CV from public 0.383 note. Considering the amount of data, I feel it is dangerous to refer to single model scores.\n```\nfold0: 0.3458651210067351\nfold1: 0.3462990692608105\nfold2: 0.36251980945990336\nfold3: 0.37588818359535553\nfold4: 0.34007067817549164\nmean: 0.3541285722996592\n```",
          "votes": 2
        },
        {
          "id": 1331679,
          "postDate": "2021-06-01T16:16:56.023Z",
          "content": "<p>I see. Thanks for the info!!<br>\nI'll try fold ensemble to compare the scores.</p>",
          "rawMarkdown": "I see. Thanks for the info!!\nI'll try fold ensemble to compare the scores.",
          "votes": 1
        },
        {
          "id": 1331681,
          "postDate": "2021-06-01T16:19:57.470Z",
          "content": "<p>My results with pytorch are not that different from the above scores for both CV/LB.</p>\n<pre><code>fold0: 0.355898104\nfold1: 0.373486813\nfold2: 0.370007682\nfold3: 0.363753474\nfold4: 0.358565185\nCV mean: 0.3643422516\nfold0 LB: 0.360\n5folds LB: 0.385\n</code></pre>",
          "rawMarkdown": "My results with pytorch are not that different from the above scores for both CV/LB.\n```\nfold0: 0.355898104\nfold1: 0.373486813\nfold2: 0.370007682\nfold3: 0.363753474\nfold4: 0.358565185\nCV mean: 0.3643422516\nfold0 LB: 0.360\n5folds LB: 0.385\n```",
          "votes": 2
        },
        {
          "id": 1331688,
          "postDate": "2021-06-01T16:26:27.650Z",
          "content": "<p>Large differences between folds as you said.<br>\nI'll stick to PyTorch :)</p>",
          "rawMarkdown": "Large differences between folds as you said.\nI'll stick to PyTorch :)",
          "votes": 1
        },
        {
          "id": 1332758,
          "postDate": "2021-06-02T09:25:16.080Z",
          "content": "<p>same as me. I have reached 0.363 by single b7. 0.330 by single resnet101. I will stick it.  </p>",
          "rawMarkdown": "same as me. I have reached 0.363 by single b7. 0.330 by single resnet101. I will stick it.  "
        },
        {
          "id": 1337254,
          "postDate": "2021-06-05T14:04:33.057Z",
          "content": "<p>thak you for your help. i try to that.</p>",
          "rawMarkdown": "thak you for your help. i try to that."
        }
      ]
    },
    {
      "id": 1332645,
      "postDate": "2021-06-02T08:22:25.367Z",
      "content": "<p>I also couldn't get a good result with PyTorch. <br>\nTried several architectures from efficientnet_pytorch package.<br>\nWith EfficientNet-b3, image size 600 I got only 0.33 on LB with 5-folds :-(</p>\n<p>I'll post my results with B7 and image_size 512 later.</p>\n<p>Which efficientnet implementation do you use?</p>",
      "rawMarkdown": "I also couldn't get a good result with PyTorch. \nTried several architectures from efficientnet_pytorch package.\nWith EfficientNet-b3, image size 600 I got only 0.33 on LB with 5-folds :-(\n\nI'll post my results with B7 and image_size 512 later.\n\nWhich efficientnet implementation do you use?",
      "votes": 2,
      "replies": [
        {
          "id": 1332668,
          "postDate": "2021-06-02T08:31:37.400Z",
          "content": "<p>I use EfficientNetB0 (timm package) for experiments, and its 5folds ensemble led to 0.356.</p>",
          "rawMarkdown": "I use EfficientNetB0 (timm package) for experiments, and its 5folds ensemble led to 0.356."
        },
        {
          "id": 1332697,
          "postDate": "2021-06-02T08:46:50.967Z",
          "content": "<p>Thanks, I'll try it too</p>",
          "rawMarkdown": "Thanks, I'll try it too"
        },
        {
          "id": 1333943,
          "postDate": "2021-06-03T07:04:41.250Z",
          "content": "<p>I found a bug in my preparation of submission) Now I have similar results with yours - thanks a lot)</p>",
          "rawMarkdown": "I found a bug in my preparation of submission) Now I have similar results with yours - thanks a lot)",
          "votes": 1
        },
        {
          "id": 1334324,
          "postDate": "2021-06-03T12:22:17.837Z",
          "content": "<p>if you are using B0 to B3 go for 256 to 384 image size 512 doesn't seem to work well in this competition, I am using b5 with 512 size 5 folds in pytorch with mix precision and I get 38.1 on LB and 38.5 on CV</p>",
          "rawMarkdown": "if you are using B0 to B3 go for 256 to 384 image size 512 doesn't seem to work well in this competition, I am using b5 with 512 size 5 folds in pytorch with mix precision and I get 38.1 on LB and 38.5 on CV",
          "votes": 1
        },
        {
          "id": 1349903,
          "postDate": "2021-06-15T07:13:59.990Z",
          "content": "<p><a href=\"https://www.kaggle.com/drtausamaru\" target=\"_blank\">@drtausamaru</a> <a href=\"https://www.kaggle.com/mgurevich\" target=\"_blank\">@mgurevich</a> Folks, I'm facing exactly the same problems with timm library (score is below tf public kernels). Have you figured out what is going on?</p>",
          "rawMarkdown": "@drtausamaru @mgurevich Folks, I'm facing exactly the same problems with timm library (score is below tf public kernels). Have you figured out what is going on?"
        },
        {
          "id": 1349942,
          "postDate": "2021-06-15T07:33:00.270Z",
          "content": "<p>I'm currently using pytorch + timm. I haven't tried large nets, but I have a decent results with b3-b4 models.</p>",
          "rawMarkdown": "I'm currently using pytorch + timm. I haven't tried large nets, but I have a decent results with b3-b4 models.",
          "votes": 1
        },
        {
          "id": 1358411,
          "postDate": "2021-06-20T12:21:17.253Z",
          "content": "<p><a href=\"https://www.kaggle.com/mgurevich\" target=\"_blank\">@mgurevich</a> are you using efficientnets directly or tf_efficientnet from timm? I can't get good models going deeper than effb3, all of then got bad score.</p>",
          "rawMarkdown": "@mgurevich are you using efficientnets directly or tf_efficientnet from timm? I can't get good models going deeper than effb3, all of then got bad score."
        },
        {
          "id": 1359137,
          "postDate": "2021-06-21T05:26:16.250Z",
          "content": "<p>I'm using efficientnets from timm, not the tf_efficientnet. But when I had tried tf_efficientnets the results were similar.</p>",
          "rawMarkdown": "I'm using efficientnets from timm, not the tf_efficientnet. But when I had tried tf_efficientnets the results were similar."
        },
        {
          "id": 1359751,
          "postDate": "2021-06-21T13:44:32.943Z",
          "content": "<p>can you tell your highest cv and lb score of effnet in study level only .</p>",
          "rawMarkdown": "can you tell your highest cv and lb score of effnet in study level only ."
        },
        {
          "id": 1359806,
          "postDate": "2021-06-21T14:36:32.447Z",
          "content": "<p>Yes, here it is CV 0.4504, LB - 0.456 - EffNet with some tricks :-)</p>",
          "rawMarkdown": "Yes, here it is CV 0.4504, LB - 0.456 - EffNet with some tricks :-)",
          "votes": 1,
          "replies": [
            {
              "id": 1359839,
              "postDate": "2021-06-21T15:09:51.513Z",
              "content": "<p>impressive scores ! btw did the competition host changed the training data or its labels too so far that i know is they changed the test labels ?? as  i am using the old images that i generated before and my cv is same as before i.e 0.3x  or might be i am calculating it wrong as i havent tried it in lb  yet .</p>",
              "rawMarkdown": "impressive scores ! btw did the competition host changed the training data or its labels too so far that i know is they changed the test labels ?? as  i am using the old images that i generated before and my cv is same as before i.e 0.3x  or might be i am calculating it wrong as i havent tried it in lb  yet ."
            }
          ]
        },
        {
          "id": 1359826,
          "postDate": "2021-06-21T14:58:41.837Z",
          "rawMarkdown": "",
          "isDeleted": true
        },
        {
          "id": 1359909,
          "postDate": "2021-06-21T16:29:13.120Z",
          "content": "<p>As far as I understand - images didn't change at all.<br>\nI checked csv files - they didn't change.</p>",
          "rawMarkdown": "As far as I understand - images didn't change at all.\nI checked csv files - they didn't change.",
          "votes": 1
        }
      ]
    },
    {
      "id": 1330989,
      "postDate": "2021-06-01T07:57:19.097Z",
      "content": "<p>Maybe the image information was lost by resize operation? And by the way, the prediction(confidence score) is different between the different size of same image in my experiment results. I'm not sure, the LB score has some relation with the confidence score?</p>",
      "rawMarkdown": "Maybe the image information was lost by resize operation? And by the way, the prediction(confidence score) is different between the different size of same image in my experiment results. I'm not sure, the LB score has some relation with the confidence score?",
      "votes": 2,
      "replies": [
        {
          "id": 1331190,
          "postDate": "2021-06-01T10:24:16.653Z",
          "content": "<p>Hmm, resize method is also applied in public notebook, and the size difference is not so big (512 vs 600).<br>\nI also tried crossentropy loss, 1 image per study, TPU and other tuning, but they didn't work well.<br>\nFor TPU application, TF might have bigger batch size than torch XLA.</p>",
          "rawMarkdown": "Hmm, resize method is also applied in public notebook, and the size difference is not so big (512 vs 600).\nI also tried crossentropy loss, 1 image per study, TPU and other tuning, but they didn't work well.\nFor TPU application, TF might have bigger batch size than torch XLA."
        },
        {
          "id": 1331214,
          "postDate": "2021-06-01T10:39:42.733Z",
          "content": "<p>What about your train_test_split operation? Maybe the train set and validation set is different in your PyTorch&amp;TensorFlow notebook. So result in the checkpoint weights difference.</p>",
          "rawMarkdown": "What about your train_test_split operation? Maybe the train set and validation set is different in your PyTorch&TensorFlow notebook. So result in the checkpoint weights difference.",
          "votes": 1
        },
        {
          "id": 1331217,
          "postDate": "2021-06-01T10:42:20.327Z",
          "content": "<p>I used multilabel stratified kfold.<br>\nYeah, the split way is one possibility. Thanks!<br>\nTest data is small, so we have to be careful about how to interpret the LB result.</p>",
          "rawMarkdown": "I used multilabel stratified kfold.\nYeah, the split way is one possibility. Thanks!\nTest data is small, so we have to be careful about how to interpret the LB result."
        }
      ]
    },
    {
      "id": 1331086,
      "postDate": "2021-06-01T09:06:45.167Z",
      "content": "<p>It seems to be true, as Tensorflow is produced mainly for industrial usage, its models' performances usually are slightly better than Pytorch models' counterparts, which are mostly used for scientific research.</p>",
      "rawMarkdown": "It seems to be true, as Tensorflow is produced mainly for industrial usage, its models' performances usually are slightly better than Pytorch models' counterparts, which are mostly used for scientific research.",
      "votes": -1,
      "replies": [
        {
          "id": 1331181,
          "postDate": "2021-06-01T10:19:02.493Z",
          "content": "<p>I didn't know such a kind of difference…</p>",
          "rawMarkdown": "I didn't know such a kind of difference..."
        }
      ]
    }
  ],
  "comments": [
    {
      "id": 1577730,
      "author_name": "Datalearning",
      "author_url": "",
      "post_date": "2021-11-10T10:53:09.693000",
      "content": "<p><strong>The following are the most significant distinctions between PyTorch and TensorFlow.</strong> </p>\n<p>Because of the different coding styles that these frameworks encourage, <a href=\"https://www.learnbay.co/data-science-course/\" target=\"_blank\">PyTorch may be easier to use than TensorFlow if you're already a Python coder</a>.</p>\n<p>In a 2017 essay for Towards Data Science, Kirill Dubovikov, the CTO of Cinimex DataLab, lays down some of these discrepancies. TensorFlow, according to Dubovikov, \"feels more like a library than a framework\" since \"all operations are quite low-level and you will need to write a lot of boilerplate code even if you don't want to.\" While TensorFlow offers abstractions that can help you write less boilerplate code, PyTorch's more Pythonic and imperative programming style may make it feel more obvious and user-friendly.</p>\n<p>However, certain aspects of the framework may make TensorFlow more appealing in specific cases.<br>\nDashboards and data visualization<br>\nTensorFlow contains TensorBoard, a visualization framework for displaying data dashboards. PyTorch has its own visualization toolkit, Visdom, however, it isn't as comprehensive as TensorBoard. TensorBoard is also integrated with PyTorch.</p>\n<p><strong>Deployment and Scalability</strong><br>\nTensorFlow considers scalability. As a result, large-scale applications that need the usage of several servers may find the TensorFlow framework to be easier to handle.</p>\n<p>TensorFlow models have traditionally been easier to deploy on browsers and phones using TensorFlow Extended (TFX), TensorFlow's deployment infrastructure, than PyTorch ML models. TensorFlow also made deployment easier in general.</p>\n<p>This changed in 2020, when TorchServe, a tool for serving PyTorch models, was released. The tool isn't as complicated as TFX, but it does offer a flexible and simple deployment mechanism.</p>\n<p><strong>Data Parallelism</strong><br>\nParallelism implementation is also a significant distinction between the two frameworks. PyTorch improves speed by taking advantage of <a href=\"https://www.learnbay.co/data-science-course/data-science-course-in-bangalore/\" target=\"_blank\">Python's</a> asynchronous execution capabilities, which allows you to distribute training across numerous GPUs with a single line of code. With TensorFlow, you'll have to do it manually, which means more code will be written.</p>\n<p>PyTorch is the more \"user-friendly\" of the two frameworks, and its design makes it ideal for quick solutions and smaller applications. TensorFlow has some capabilities that make it ideal for larger groups, particularly enterprise machine learning researchers.</p>\n<p>The framework's toolbox for deploying models on both mobile devices and servers is one of the reasons it was deemed the best option for <a href=\"https://www.learnbay.co/\" target=\"_blank\">machine-learning firms</a>. Over the last few years, though, modifications to PyTorch have made it a far more attractive commercial option.</p>",
      "votes": 1,
      "replies": []
    },
    {
      "id": 1331245,
      "author_name": "Awsaf",
      "author_url": "",
      "post_date": "2021-06-01T11:10:30.447000",
      "content": "<p>What about <strong>CV</strong>? Did you also check that?</p>",
      "votes": 1,
      "replies": [
        {
          "id": 1331265,
          "author_name": "cool_rabbit",
          "author_url": "",
          "post_date": "2021-06-01T11:21:43.270000",
          "content": "<p>I didn't check TF's.<br>\nCV 0.350 for PyTorch.</p>",
          "votes": 1,
          "replies": []
        },
        {
          "id": 1331666,
          "author_name": "YujiAriyasu",
          "author_url": "",
          "post_date": "2021-06-01T16:07:46.450000",
          "content": "<p>The following is a CV from public 0.383 note. Considering the amount of data, I feel it is dangerous to refer to single model scores.</p>\n<pre><code>fold0: 0.3458651210067351\nfold1: 0.3462990692608105\nfold2: 0.36251980945990336\nfold3: 0.37588818359535553\nfold4: 0.34007067817549164\nmean: 0.3541285722996592\n</code></pre>",
          "votes": 2,
          "replies": []
        },
        {
          "id": 1331679,
          "author_name": "cool_rabbit",
          "author_url": "",
          "post_date": "2021-06-01T16:16:56.023000",
          "content": "<p>I see. Thanks for the info!!<br>\nI'll try fold ensemble to compare the scores.</p>",
          "votes": 1,
          "replies": []
        },
        {
          "id": 1331681,
          "author_name": "YujiAriyasu",
          "author_url": "",
          "post_date": "2021-06-01T16:19:57.470000",
          "content": "<p>My results with pytorch are not that different from the above scores for both CV/LB.</p>\n<pre><code>fold0: 0.355898104\nfold1: 0.373486813\nfold2: 0.370007682\nfold3: 0.363753474\nfold4: 0.358565185\nCV mean: 0.3643422516\nfold0 LB: 0.360\n5folds LB: 0.385\n</code></pre>",
          "votes": 2,
          "replies": []
        },
        {
          "id": 1331688,
          "author_name": "cool_rabbit",
          "author_url": "",
          "post_date": "2021-06-01T16:26:27.650000",
          "content": "<p>Large differences between folds as you said.<br>\nI'll stick to PyTorch :)</p>",
          "votes": 1,
          "replies": []
        },
        {
          "id": 1332758,
          "author_name": "朴大福",
          "author_url": "",
          "post_date": "2021-06-02T09:25:16.080000",
          "content": "<p>same as me. I have reached 0.363 by single b7. 0.330 by single resnet101. I will stick it.  </p>",
          "votes": 0,
          "replies": []
        },
        {
          "id": 1337254,
          "author_name": "tensor choko",
          "author_url": "",
          "post_date": "2021-06-05T14:04:33.057000",
          "content": "<p>thak you for your help. i try to that.</p>",
          "votes": 0,
          "replies": []
        }
      ]
    },
    {
      "id": 1332645,
      "author_name": "Mikhail Gurevich",
      "author_url": "",
      "post_date": "2021-06-02T08:22:25.367000",
      "content": "<p>I also couldn't get a good result with PyTorch. <br>\nTried several architectures from efficientnet_pytorch package.<br>\nWith EfficientNet-b3, image size 600 I got only 0.33 on LB with 5-folds :-(</p>\n<p>I'll post my results with B7 and image_size 512 later.</p>\n<p>Which efficientnet implementation do you use?</p>",
      "votes": 2,
      "replies": [
        {
          "id": 1332668,
          "author_name": "cool_rabbit",
          "author_url": "",
          "post_date": "2021-06-02T08:31:37.400000",
          "content": "<p>I use EfficientNetB0 (timm package) for experiments, and its 5folds ensemble led to 0.356.</p>",
          "votes": 0,
          "replies": []
        },
        {
          "id": 1332697,
          "author_name": "Mikhail Gurevich",
          "author_url": "",
          "post_date": "2021-06-02T08:46:50.967000",
          "content": "<p>Thanks, I'll try it too</p>",
          "votes": 0,
          "replies": []
        },
        {
          "id": 1333943,
          "author_name": "Mikhail Gurevich",
          "author_url": "",
          "post_date": "2021-06-03T07:04:41.250000",
          "content": "<p>I found a bug in my preparation of submission) Now I have similar results with yours - thanks a lot)</p>",
          "votes": 1,
          "replies": []
        },
        {
          "id": 1334324,
          "author_name": "Varun Dutt",
          "author_url": "",
          "post_date": "2021-06-03T12:22:17.837000",
          "content": "<p>if you are using B0 to B3 go for 256 to 384 image size 512 doesn't seem to work well in this competition, I am using b5 with 512 size 5 folds in pytorch with mix precision and I get 38.1 on LB and 38.5 on CV</p>",
          "votes": 1,
          "replies": []
        },
        {
          "id": 1349903,
          "author_name": "Leonid",
          "author_url": "",
          "post_date": "2021-06-15T07:13:59.990000",
          "content": "<p><a href=\"https://www.kaggle.com/drtausamaru\" target=\"_blank\">@drtausamaru</a> <a href=\"https://www.kaggle.com/mgurevich\" target=\"_blank\">@mgurevich</a> Folks, I'm facing exactly the same problems with timm library (score is below tf public kernels). Have you figured out what is going on?</p>",
          "votes": 0,
          "replies": []
        },
        {
          "id": 1349942,
          "author_name": "Mikhail Gurevich",
          "author_url": "",
          "post_date": "2021-06-15T07:33:00.270000",
          "content": "<p>I'm currently using pytorch + timm. I haven't tried large nets, but I have a decent results with b3-b4 models.</p>",
          "votes": 1,
          "replies": []
        },
        {
          "id": 1358411,
          "author_name": "IgorMuniz",
          "author_url": "",
          "post_date": "2021-06-20T12:21:17.253000",
          "content": "<p><a href=\"https://www.kaggle.com/mgurevich\" target=\"_blank\">@mgurevich</a> are you using efficientnets directly or tf_efficientnet from timm? I can't get good models going deeper than effb3, all of then got bad score.</p>",
          "votes": 0,
          "replies": []
        },
        {
          "id": 1359137,
          "author_name": "Mikhail Gurevich",
          "author_url": "",
          "post_date": "2021-06-21T05:26:16.250000",
          "content": "<p>I'm using efficientnets from timm, not the tf_efficientnet. But when I had tried tf_efficientnets the results were similar.</p>",
          "votes": 0,
          "replies": []
        },
        {
          "id": 1359751,
          "author_name": "Shubham Thapa",
          "author_url": "",
          "post_date": "2021-06-21T13:44:32.943000",
          "content": "<p>can you tell your highest cv and lb score of effnet in study level only .</p>",
          "votes": 0,
          "replies": []
        },
        {
          "id": 1359806,
          "author_name": "Mikhail Gurevich",
          "author_url": "",
          "post_date": "2021-06-21T14:36:32.447000",
          "content": "<p>Yes, here it is CV 0.4504, LB - 0.456 - EffNet with some tricks :-)</p>",
          "votes": 1,
          "replies": [
            {
              "id": 1359839,
              "author_name": "Shubham Thapa",
              "author_url": "",
              "post_date": "2021-06-21T15:09:51.513000",
              "content": "<p>impressive scores ! btw did the competition host changed the training data or its labels too so far that i know is they changed the test labels ?? as  i am using the old images that i generated before and my cv is same as before i.e 0.3x  or might be i am calculating it wrong as i havent tried it in lb  yet .</p>",
              "votes": 0,
              "replies": []
            }
          ]
        },
        {
          "id": 1359826,
          "author_name": "",
          "author_url": "",
          "post_date": "2021-06-21T14:58:41.837000",
          "content": "",
          "votes": 0,
          "replies": []
        },
        {
          "id": 1359909,
          "author_name": "Mikhail Gurevich",
          "author_url": "",
          "post_date": "2021-06-21T16:29:13.120000",
          "content": "<p>As far as I understand - images didn't change at all.<br>\nI checked csv files - they didn't change.</p>",
          "votes": 1,
          "replies": []
        }
      ]
    },
    {
      "id": 1330989,
      "author_name": "blueboy-97",
      "author_url": "",
      "post_date": "2021-06-01T07:57:19.097000",
      "content": "<p>Maybe the image information was lost by resize operation? And by the way, the prediction(confidence score) is different between the different size of same image in my experiment results. I'm not sure, the LB score has some relation with the confidence score?</p>",
      "votes": 2,
      "replies": [
        {
          "id": 1331190,
          "author_name": "cool_rabbit",
          "author_url": "",
          "post_date": "2021-06-01T10:24:16.653000",
          "content": "<p>Hmm, resize method is also applied in public notebook, and the size difference is not so big (512 vs 600).<br>\nI also tried crossentropy loss, 1 image per study, TPU and other tuning, but they didn't work well.<br>\nFor TPU application, TF might have bigger batch size than torch XLA.</p>",
          "votes": 0,
          "replies": []
        },
        {
          "id": 1331214,
          "author_name": "blueboy-97",
          "author_url": "",
          "post_date": "2021-06-01T10:39:42.733000",
          "content": "<p>What about your train_test_split operation? Maybe the train set and validation set is different in your PyTorch&amp;TensorFlow notebook. So result in the checkpoint weights difference.</p>",
          "votes": 1,
          "replies": []
        },
        {
          "id": 1331217,
          "author_name": "cool_rabbit",
          "author_url": "",
          "post_date": "2021-06-01T10:42:20.327000",
          "content": "<p>I used multilabel stratified kfold.<br>\nYeah, the split way is one possibility. Thanks!<br>\nTest data is small, so we have to be careful about how to interpret the LB result.</p>",
          "votes": 0,
          "replies": []
        }
      ]
    },
    {
      "id": 1331086,
      "author_name": "The fearless",
      "author_url": "",
      "post_date": "2021-06-01T09:06:45.167000",
      "content": "<p>It seems to be true, as Tensorflow is produced mainly for industrial usage, its models' performances usually are slightly better than Pytorch models' counterparts, which are mostly used for scientific research.</p>",
      "votes": -1,
      "replies": [
        {
          "id": 1331181,
          "author_name": "cool_rabbit",
          "author_url": "",
          "post_date": "2021-06-01T10:19:02.493000",
          "content": "<p>I didn't know such a kind of difference…</p>",
          "votes": 0,
          "replies": []
        }
      ]
    }
  ],
  "raw_markdown_by_id": {
    "1330958": "There seems to be some LB score gap between PyTorch and TensorFlow (PyTorch < TensorFlow).\n\nMy PyTorch notebook (EFB7 single fold, size=512)→0.354\nPublic TensorFlow notebook (EFB7 single fold, size=600)→0.379\n\nLots of experiments done, but never reach 0.370 by simple PyTorch model (without PP or more augmentations).\n\nDoes anyone has the similar experience here?\nJust size difference?\nOr my fault?",
    "1577730": "**The following are the most significant distinctions between PyTorch and TensorFlow.** \n\nBecause of the different coding styles that these frameworks encourage, [PyTorch may be easier to use than TensorFlow if you're already a Python coder](https://www.learnbay.co/data-science-course/).\n\nIn a 2017 essay for Towards Data Science, Kirill Dubovikov, the CTO of Cinimex DataLab, lays down some of these discrepancies. TensorFlow, according to Dubovikov, \"feels more like a library than a framework\" since \"all operations are quite low-level and you will need to write a lot of boilerplate code even if you don't want to.\" While TensorFlow offers abstractions that can help you write less boilerplate code, PyTorch's more Pythonic and imperative programming style may make it feel more obvious and user-friendly.\n\nHowever, certain aspects of the framework may make TensorFlow more appealing in specific cases.\nDashboards and data visualization\nTensorFlow contains TensorBoard, a visualization framework for displaying data dashboards. PyTorch has its own visualization toolkit, Visdom, however, it isn't as comprehensive as TensorBoard. TensorBoard is also integrated with PyTorch.\n\n**Deployment and Scalability**\nTensorFlow considers scalability. As a result, large-scale applications that need the usage of several servers may find the TensorFlow framework to be easier to handle.\n\nTensorFlow models have traditionally been easier to deploy on browsers and phones using TensorFlow Extended (TFX), TensorFlow's deployment infrastructure, than PyTorch ML models. TensorFlow also made deployment easier in general.\n\nThis changed in 2020, when TorchServe, a tool for serving PyTorch models, was released. The tool isn't as complicated as TFX, but it does offer a flexible and simple deployment mechanism.\n\n**Data Parallelism**\nParallelism implementation is also a significant distinction between the two frameworks. PyTorch improves speed by taking advantage of [Python's](https://www.learnbay.co/data-science-course/data-science-course-in-bangalore/) asynchronous execution capabilities, which allows you to distribute training across numerous GPUs with a single line of code. With TensorFlow, you'll have to do it manually, which means more code will be written.\n\nPyTorch is the more \"user-friendly\" of the two frameworks, and its design makes it ideal for quick solutions and smaller applications. TensorFlow has some capabilities that make it ideal for larger groups, particularly enterprise machine learning researchers.\n\nThe framework's toolbox for deploying models on both mobile devices and servers is one of the reasons it was deemed the best option for [machine-learning firms](https://www.learnbay.co/). Over the last few years, though, modifications to PyTorch have made it a far more attractive commercial option.\n",
    "1331245": "What about **CV**? Did you also check that?",
    "1332645": "I also couldn't get a good result with PyTorch. \nTried several architectures from efficientnet_pytorch package.\nWith EfficientNet-b3, image size 600 I got only 0.33 on LB with 5-folds :-(\n\nI'll post my results with B7 and image_size 512 later.\n\nWhich efficientnet implementation do you use?",
    "1330989": "Maybe the image information was lost by resize operation? And by the way, the prediction(confidence score) is different between the different size of same image in my experiment results. I'm not sure, the LB score has some relation with the confidence score?",
    "1331086": "It seems to be true, as Tensorflow is produced mainly for industrial usage, its models' performances usually are slightly better than Pytorch models' counterparts, which are mostly used for scientific research."
  }
}