{
  "id": 104084,
  "title": "Small Notes on How to Use B6-B7 Keras EfficientNet",
  "url": "/competitions/aptos2019-blindness-detection/discussion/104084",
  "author_name": "Neuron Engineer",
  "post_date": "2019-08-14T06:09:29.114000",
  "votes": 26,
  "comment_count": 26,
  "views": 0,
  "content": "<p>In the kernel, it appears at the moment that if we use </p>\n\n<p><code>!pip3 install efficientnet</code></p>\n\n<p>we will get the old 0.0.4 version</p>\n\n<p>So instead use</p>\n\n<p><code>!git clone https://github.com/qubvel/efficientnet.git</code></p>\n\n<p>By this we will get the latest version which has new B6/B7 implementation and pretrained weights … :)</p>\n\n<p>How to use: (models can be build with Keras or Tensorflow frameworks (efficientnet.keras / efficientnet.tfkeras))</p>\n\n<p><code>import efficientnet.keras as efn</code></p>\n\n<p><code>model = efn.EfficientNetB6(weights='imagenet')</code></p>\n\n<p>Kudos to Pavel Yakubovskiy <a href=\"/pavel92\">@pavel92</a> for all his contributions, please give him github stars!\n<a href=\"https://github.com/qubvel\">https://github.com/qubvel</a></p>\n\n<p>Note: if you have commit errors, you can try <code>rm -rf efficientnet</code> at the end of the kernel</p>\n\n<p><strong>EDIT</strong> Just to be clear, our team’s current LB score is not yet related to these B6/B7 experiments :) &gt;&gt; See my reply to Yiling X below ...</p>",
  "messages": [
    {
      "id": 598850,
      "postDate": "2019-08-14T06:09:29.113Z",
      "content": "<p>In the kernel, it appears at the moment that if we use </p>\n\n<p><code>!pip3 install efficientnet</code></p>\n\n<p>we will get the old 0.0.4 version</p>\n\n<p>So instead use</p>\n\n<p><code>!git clone https://github.com/qubvel/efficientnet.git</code></p>\n\n<p>By this we will get the latest version which has new B6/B7 implementation and pretrained weights … :)</p>\n\n<p>How to use: (models can be build with Keras or Tensorflow frameworks (efficientnet.keras / efficientnet.tfkeras))</p>\n\n<p><code>import efficientnet.keras as efn</code></p>\n\n<p><code>model = efn.EfficientNetB6(weights='imagenet')</code></p>\n\n<p>Kudos to Pavel Yakubovskiy <a href=\"/pavel92\">@pavel92</a> for all his contributions, please give him github stars!\n<a href=\"https://github.com/qubvel\">https://github.com/qubvel</a></p>\n\n<p>Note: if you have commit errors, you can try <code>rm -rf efficientnet</code> at the end of the kernel</p>\n\n<p><strong>EDIT</strong> Just to be clear, our team’s current LB score is not yet related to these B6/B7 experiments :) &gt;&gt; See my reply to Yiling X below ...</p>",
      "rawMarkdown": "In the kernel, it appears at the moment that if we use \n\n`!pip3 install efficientnet`\n\nwe will get the old 0.0.4 version\n\nSo instead use\n\n`!git clone https://github.com/qubvel/efficientnet.git`\n\nBy this we will get the latest version which has new B6/B7 implementation and pretrained weights … :)\n\nHow to use: (models can be build with Keras or Tensorflow frameworks (efficientnet.keras / efficientnet.tfkeras))\n\n`import efficientnet.keras as efn`\n\n`model = efn.EfficientNetB6(weights='imagenet')`\n\nKudos to Pavel Yakubovskiy @pavel92 for all his contributions, please give him github stars!\nhttps://github.com/qubvel\n\nNote: if you have commit errors, you can try `rm -rf efficientnet` at the end of the kernel\n\n**EDIT** Just to be clear, our team’s current LB score is not yet related to these B6/B7 experiments :) &gt;&gt; See my reply to Yiling X below ...\n",
      "votes": 26
    },
    {
      "id": 600007,
      "postDate": "2019-08-15T14:29:25.113Z",
      "content": "<p>Take care with the batch sizes! Using larger models allows less samples into the memory. Batch size below 16 will decrease model accuracy. If I train B5 on my 8GB GPU, then it achives lower accuracy than B3... I'm about to move to the cloud!</p>",
      "rawMarkdown": "Take care with the batch sizes! Using larger models allows less samples into the memory. Batch size below 16 will decrease model accuracy. If I train B5 on my 8GB GPU, then it achives lower accuracy than B3... I'm about to move to the cloud!",
      "votes": 3,
      "replies": [
        {
          "id": 600013,
          "postDate": "2019-08-15T14:35:12.777Z",
          "content": "<p>if you use batch accumulation, that doesn't hurt accuracy. (of course it's slower though)</p>",
          "rawMarkdown": "if you use batch accumulation, that doesn't hurt accuracy. (of course it's slower though)",
          "votes": 4
        },
        {
          "id": 600726,
          "postDate": "2019-08-16T13:56:24.527Z",
          "rawMarkdown": "",
          "isDeleted": true
        }
      ]
    },
    {
      "id": 603595,
      "postDate": "2019-08-20T13:29:24.240Z",
      "content": "<p>installation of EfficientNet needs internet and after I ON internet in kaggle kernel then at the time of submission, I cann't able to submmit my csv.\nI think internet use is prohibited in this competition.\nplease help me\nthanks in advance</p>",
      "rawMarkdown": "installation of EfficientNet needs internet and after I ON internet in kaggle kernel then at the time of submission, I cann't able to submmit my csv.\nI think internet use is prohibited in this competition.\nplease help me\nthanks in advance",
      "votes": 1,
      "replies": [
        {
          "id": 603613,
          "postDate": "2019-08-20T13:45:16.007Z",
          "content": "<p>Hi <a href=\"/niteshfre\">@niteshfre</a> , please separate the training kernel and the inference kernel. In “training”, internet=ON (no submit). In “inference”, internet=OFF, I think we can use keras’ <code>load_model</code> for B6 or use simply the script and <code>load_weights</code> for B0-B5\n<a href=\"https://www.kaggle.com/c/aptos2019-blindness-detection/forums/t/100186/public-efficientnet-keras-weights-and-utility-script?forumMessageId=577775#post577775\">https://www.kaggle.com/c/aptos2019-blindness-detection/forums/t/100186/public-efficientnet-keras-weights-and-utility-script?forumMessageId=577775#post577775</a>\n.</p>",
          "rawMarkdown": "Hi @niteshfre , please separate the training kernel and the inference kernel. In “training”, internet=ON (no submit). In “inference”, internet=OFF, I think we can use keras’ `load_model` for B6 or use simply the script and `load_weights` for B0-B5\nhttps://www.kaggle.com/c/aptos2019-blindness-detection/forums/t/100186/public-efficientnet-keras-weights-and-utility-script?forumMessageId=577775#post577775\n.",
          "votes": 2
        },
        {
          "id": 603628,
          "postDate": "2019-08-20T14:01:21.117Z",
          "rawMarkdown": "",
          "votes": 1,
          "isDeleted": true
        }
      ]
    },
    {
      "id": 600279,
      "postDate": "2019-08-15T22:18:22.370Z",
      "content": "<p><a href=\"/pavel92\">@pavel92</a> Awesome work, thanks! </p>",
      "rawMarkdown": "@pavel92 Awesome work, thanks! ",
      "votes": 1,
      "replies": [
        {
          "id": 600286,
          "postDate": "2019-08-15T22:48:48.927Z",
          "content": "<p>Thanks to let me know that's he is here!</p>",
          "rawMarkdown": "Thanks to let me know that's he is here!",
          "votes": 1
        }
      ]
    },
    {
      "id": 599918,
      "postDate": "2019-08-15T12:57:46.770Z",
      "content": "<p>By using git clone won't there be any problems with submitting predictions as the kernel should be offline or is there a workaround ?</p>",
      "rawMarkdown": "By using git clone won't there be any problems with submitting predictions as the kernel should be offline or is there a workaround ?",
      "votes": 1,
      "replies": [
        {
          "id": 600285,
          "postDate": "2019-08-15T22:47:11.613Z",
          "content": "<p>Hi <a href=\"/jonasfreibs\">@jonasfreibs</a> Jonas, we can clone only on training kernel, and upload as a dataset on the inference kernel (e.g. using keras <code>load_model</code>)</p>",
          "rawMarkdown": "Hi @jonasfreibs Jonas, we can clone only on training kernel, and upload as a dataset on the inference kernel (e.g. using keras `load_model`)",
          "votes": 1
        },
        {
          "id": 600532,
          "postDate": "2019-08-16T08:35:10.977Z",
          "content": "<p>I see, thank you for the notes and the advice :)</p>",
          "rawMarkdown": "I see, thank you for the notes and the advice :)",
          "votes": 1
        }
      ]
    },
    {
      "id": 599054,
      "postDate": "2019-08-14T12:41:34.870Z",
      "content": "<p>i get ModuleNotFoundError: No module named 'efficientnet.keras' error when I use<code>import efficientnet.keras as efn\n</code></p>",
      "rawMarkdown": "i get ModuleNotFoundError: No module named 'efficientnet.keras' error when I use`import efficientnet.keras as efn\n`",
      "votes": 1,
      "replies": [
        {
          "id": 599145,
          "postDate": "2019-08-14T14:49:26.573Z",
          "content": "<p>Perhaps try <code>import efficientnet.efficientnet.keras as efn</code> instead... To be sure, we can\n<code>!ls -l</code> to see our directory structure and import according to that structure :)</p>",
          "rawMarkdown": "Perhaps try `import efficientnet.efficientnet.keras as efn` instead... To be sure, we can\n`!ls -l` to see our directory structure and import according to that structure :)"
        },
        {
          "id": 610242,
          "postDate": "2019-08-28T15:19:55.180Z",
          "content": "<p>This is not related to the competition, but why won't the following work after I cloned the repository:</p>\n\n<p>import sys\nsys.path.insert(0, '/kaggle/work/efficientnet')\nimport efficientnet.keras as efn\nmodel = efn.EfficientNetB5(weights='imagenet', include_top=False)</p>\n\n<p>The error I get it \"No module named 'efficientnet.keras'\". I am just starting my first kaggle competition so all help is appreciated. Thanks in advance. </p>",
          "rawMarkdown": "This is not related to the competition, but why won't the following work after I cloned the repository:\n\nimport sys\nsys.path.insert(0, '/kaggle/work/efficientnet')\nimport efficientnet.keras as efn\nmodel = efn.EfficientNetB5(weights='imagenet', include_top=False)\n\nThe error I get it \"No module named 'efficientnet.keras'\". I am just starting my first kaggle competition so all help is appreciated. Thanks in advance. "
        }
      ]
    },
    {
      "id": 607455,
      "postDate": "2019-08-25T09:25:36.693Z",
      "content": "<p>Thanks for the post <a href=\"/ratthachat\">@ratthachat</a> \nI've added B6 and B7 weights to the kaggle dataset: <a href=\"https://www.kaggle.com/hmendonca/efficientnet-pytorch\">https://www.kaggle.com/hmendonca/efficientnet-pytorch</a>\nIn case anyone wants to use it on a kernel without internet\nCheers and happy kaggling! :)</p>\n\n<p>edit: Sorry, I have just woken up and did realised you were talking about Keras lol. Anyway, that's the tip for anyone who uses pytorch. Please also star the linked <a href=\"https://github.com/lukemelas/EfficientNet-PyTorch/\">gihub repo</a>!</p>",
      "rawMarkdown": "Thanks for the post @ratthachat \nI've added B6 and B7 weights to the kaggle dataset: https://www.kaggle.com/hmendonca/efficientnet-pytorch\nIn case anyone wants to use it on a kernel without internet\nCheers and happy kaggling! :)\n\nedit: Sorry, I have just woken up and did realised you were talking about Keras lol. Anyway, that's the tip for anyone who uses pytorch. Please also star the linked [gihub repo](https://github.com/lukemelas/EfficientNet-PyTorch/)!",
      "votes": 2
    },
    {
      "id": 600561,
      "postDate": "2019-08-16T09:24:01.647Z",
      "content": "<p>No matter what I do, B4+ models do not converge for me. I tried different batch sizes, optimizers, but no effect. Loss is fixed and does not change during training...\nI reached my current position with B3, that one works fine!</p>\n\n<p>Can someone give me a hint, what could be the issue?</p>",
      "rawMarkdown": "No matter what I do, B4+ models do not converge for me. I tried different batch sizes, optimizers, but no effect. Loss is fixed and does not change during training...\nI reached my current position with B3, that one works fine!\n\nCan someone give me a hint, what could be the issue?",
      "votes": 2,
      "replies": [
        {
          "id": 600721,
          "postDate": "2019-08-16T13:50:09.283Z",
          "rawMarkdown": "",
          "votes": 1,
          "isDeleted": true
        },
        {
          "id": 600725,
          "postDate": "2019-08-16T13:55:10.457Z",
          "content": "<p>kernel only one GPUs</p>",
          "rawMarkdown": "kernel only one GPUs"
        },
        {
          "id": 600734,
          "postDate": "2019-08-16T14:04:10.703Z",
          "rawMarkdown": "",
          "isDeleted": true
        },
        {
          "id": 600735,
          "postDate": "2019-08-16T14:04:19.983Z",
          "content": "<p><a href=\"/thestonemx\">@thestonemx</a> Oscar, what do you mean by bugs?</p>\n\n<p><a href=\"https://keras.io/getting-started/faq/\">https://keras.io/getting-started/faq/</a> contains how to usw multi gpus. Though I haven't tried in this comp., but I used it on previous comp (doodle) and it worked well at that time ...</p>\n\n<p>Also as Camaro stated below, you can also used batch accumulation (e.g. try keras AdamAccumulation ..) Hope this helps!</p>",
          "rawMarkdown": "@thestonemx Oscar, what do you mean by bugs?\n\nhttps://keras.io/getting-started/faq/ contains how to usw multi gpus. Though I haven't tried in this comp., but I used it on previous comp (doodle) and it worked well at that time ...\n\nAlso as Camaro stated below, you can also used batch accumulation (e.g. try keras AdamAccumulation ..) Hope this helps!"
        },
        {
          "id": 601580,
          "postDate": "2019-08-17T20:43:50.150Z",
          "rawMarkdown": "",
          "isDeleted": true
        }
      ]
    },
    {
      "id": 598892,
      "postDate": "2019-08-14T07:43:07.337Z",
      "content": "<p>Did you get higher score by use bigger model?</p>",
      "rawMarkdown": "Did you get higher score by use bigger model?",
      "votes": 2,
      "replies": [
        {
          "id": 598919,
          "postDate": "2019-08-14T08:15:59.120Z",
          "content": "<p>I just begin to experiment with these big models so it may take quite a few days to know the performance :) </p>\n\n<p><strong>EDIT</strong> at the moment, I face difficulty on make it converge nicely within the kernel…</p>\n\n<p>*<em>EDIT2 (18 / 8 / 2019) *</em> To clearly answer Oscar’s query below … I think B6 maybe suits for local training. Personally I move to other methods… Our team current LB score is not related to B6/7.</p>",
          "rawMarkdown": "I just begin to experiment with these big models so it may take quite a few days to know the performance :) \n\n**EDIT** at the moment, I face difficulty on make it converge nicely within the kernel…\n\n**EDIT2 (18 / 8 / 2019) ** To clearly answer Oscar’s query below … I think B6 maybe suits for local training. Personally I move to other methods… Our team current LB score is not related to B6/7.",
          "votes": 2
        },
        {
          "id": 601582,
          "postDate": "2019-08-17T20:45:53.367Z",
          "rawMarkdown": "",
          "isDeleted": true
        }
      ]
    },
    {
      "id": 831685,
      "postDate": "2020-05-03T14:43:36.790Z",
      "content": "<p>Hi, can anyone suggest how to use efficientNet  preprocess_input module? i  have tried the one from <a href=\"https://www.tensorflow.org/api_docs/python/tf/keras/applications/efficientnet/preprocess_input\">tensorflow</a> but did not work.</p>\n\n<p>I used the same procedure mentioned to import the model and it was successful.</p>",
      "rawMarkdown": "Hi, can anyone suggest how to use efficientNet  preprocess_input module? i  have tried the one from [tensorflow](https://www.tensorflow.org/api_docs/python/tf/keras/applications/efficientnet/preprocess_input) but did not work.\n\nI used the same procedure mentioned to import the model and it was successful.\n"
    },
    {
      "id": 600261,
      "postDate": "2019-08-15T21:17:23.380Z",
      "rawMarkdown": "",
      "votes": 1,
      "isDeleted": true
    }
  ],
  "comments": [
    {
      "id": 600007,
      "author_name": "Peter Nemeth",
      "author_url": "",
      "post_date": "2019-08-15T14:29:25.113000",
      "content": "<p>Take care with the batch sizes! Using larger models allows less samples into the memory. Batch size below 16 will decrease model accuracy. If I train B5 on my 8GB GPU, then it achives lower accuracy than B3... I'm about to move to the cloud!</p>",
      "votes": 3,
      "replies": [
        {
          "id": 600013,
          "author_name": "Camaro",
          "author_url": "",
          "post_date": "2019-08-15T14:35:12.777000",
          "content": "<p>if you use batch accumulation, that doesn't hurt accuracy. (of course it's slower though)</p>",
          "votes": 4,
          "replies": []
        },
        {
          "id": 600726,
          "author_name": "",
          "author_url": "",
          "post_date": "2019-08-16T13:56:24.527000",
          "content": "",
          "votes": 0,
          "replies": []
        }
      ]
    },
    {
      "id": 603595,
      "author_name": "Nitesh Yadav",
      "author_url": "",
      "post_date": "2019-08-20T13:29:24.240000",
      "content": "<p>installation of EfficientNet needs internet and after I ON internet in kaggle kernel then at the time of submission, I cann't able to submmit my csv.\nI think internet use is prohibited in this competition.\nplease help me\nthanks in advance</p>",
      "votes": 1,
      "replies": [
        {
          "id": 603613,
          "author_name": "Neuron Engineer",
          "author_url": "",
          "post_date": "2019-08-20T13:45:16.007000",
          "content": "<p>Hi <a href=\"/niteshfre\">@niteshfre</a> , please separate the training kernel and the inference kernel. In “training”, internet=ON (no submit). In “inference”, internet=OFF, I think we can use keras’ <code>load_model</code> for B6 or use simply the script and <code>load_weights</code> for B0-B5\n<a href=\"https://www.kaggle.com/c/aptos2019-blindness-detection/forums/t/100186/public-efficientnet-keras-weights-and-utility-script?forumMessageId=577775#post577775\">https://www.kaggle.com/c/aptos2019-blindness-detection/forums/t/100186/public-efficientnet-keras-weights-and-utility-script?forumMessageId=577775#post577775</a>\n.</p>",
          "votes": 2,
          "replies": []
        },
        {
          "id": 603628,
          "author_name": "",
          "author_url": "",
          "post_date": "2019-08-20T14:01:21.117000",
          "content": "",
          "votes": 1,
          "replies": []
        }
      ]
    },
    {
      "id": 600279,
      "author_name": "xhlulu",
      "author_url": "",
      "post_date": "2019-08-15T22:18:22.370000",
      "content": "<p><a href=\"/pavel92\">@pavel92</a> Awesome work, thanks! </p>",
      "votes": 1,
      "replies": [
        {
          "id": 600286,
          "author_name": "Neuron Engineer",
          "author_url": "",
          "post_date": "2019-08-15T22:48:48.927000",
          "content": "<p>Thanks to let me know that's he is here!</p>",
          "votes": 1,
          "replies": []
        }
      ]
    },
    {
      "id": 599918,
      "author_name": "Jonas",
      "author_url": "",
      "post_date": "2019-08-15T12:57:46.770000",
      "content": "<p>By using git clone won't there be any problems with submitting predictions as the kernel should be offline or is there a workaround ?</p>",
      "votes": 1,
      "replies": [
        {
          "id": 600285,
          "author_name": "Neuron Engineer",
          "author_url": "",
          "post_date": "2019-08-15T22:47:11.613000",
          "content": "<p>Hi <a href=\"/jonasfreibs\">@jonasfreibs</a> Jonas, we can clone only on training kernel, and upload as a dataset on the inference kernel (e.g. using keras <code>load_model</code>)</p>",
          "votes": 1,
          "replies": []
        },
        {
          "id": 600532,
          "author_name": "Jonas",
          "author_url": "",
          "post_date": "2019-08-16T08:35:10.977000",
          "content": "<p>I see, thank you for the notes and the advice :)</p>",
          "votes": 1,
          "replies": []
        }
      ]
    },
    {
      "id": 599054,
      "author_name": "Kun Jiang ",
      "author_url": "",
      "post_date": "2019-08-14T12:41:34.870000",
      "content": "<p>i get ModuleNotFoundError: No module named 'efficientnet.keras' error when I use<code>import efficientnet.keras as efn\n</code></p>",
      "votes": 1,
      "replies": [
        {
          "id": 599145,
          "author_name": "Neuron Engineer",
          "author_url": "",
          "post_date": "2019-08-14T14:49:26.573000",
          "content": "<p>Perhaps try <code>import efficientnet.efficientnet.keras as efn</code> instead... To be sure, we can\n<code>!ls -l</code> to see our directory structure and import according to that structure :)</p>",
          "votes": 0,
          "replies": []
        },
        {
          "id": 610242,
          "author_name": "Shuhao Lai",
          "author_url": "",
          "post_date": "2019-08-28T15:19:55.180000",
          "content": "<p>This is not related to the competition, but why won't the following work after I cloned the repository:</p>\n\n<p>import sys\nsys.path.insert(0, '/kaggle/work/efficientnet')\nimport efficientnet.keras as efn\nmodel = efn.EfficientNetB5(weights='imagenet', include_top=False)</p>\n\n<p>The error I get it \"No module named 'efficientnet.keras'\". I am just starting my first kaggle competition so all help is appreciated. Thanks in advance. </p>",
          "votes": 0,
          "replies": []
        }
      ]
    },
    {
      "id": 607455,
      "author_name": "Henrique Mendonça",
      "author_url": "",
      "post_date": "2019-08-25T09:25:36.693000",
      "content": "<p>Thanks for the post <a href=\"/ratthachat\">@ratthachat</a> \nI've added B6 and B7 weights to the kaggle dataset: <a href=\"https://www.kaggle.com/hmendonca/efficientnet-pytorch\">https://www.kaggle.com/hmendonca/efficientnet-pytorch</a>\nIn case anyone wants to use it on a kernel without internet\nCheers and happy kaggling! :)</p>\n\n<p>edit: Sorry, I have just woken up and did realised you were talking about Keras lol. Anyway, that's the tip for anyone who uses pytorch. Please also star the linked <a href=\"https://github.com/lukemelas/EfficientNet-PyTorch/\">gihub repo</a>!</p>",
      "votes": 2,
      "replies": []
    },
    {
      "id": 600561,
      "author_name": "Peter Nemeth",
      "author_url": "",
      "post_date": "2019-08-16T09:24:01.647000",
      "content": "<p>No matter what I do, B4+ models do not converge for me. I tried different batch sizes, optimizers, but no effect. Loss is fixed and does not change during training...\nI reached my current position with B3, that one works fine!</p>\n\n<p>Can someone give me a hint, what could be the issue?</p>",
      "votes": 2,
      "replies": [
        {
          "id": 600721,
          "author_name": "",
          "author_url": "",
          "post_date": "2019-08-16T13:50:09.283000",
          "content": "",
          "votes": 1,
          "replies": []
        },
        {
          "id": 600725,
          "author_name": "Kun Jiang ",
          "author_url": "",
          "post_date": "2019-08-16T13:55:10.457000",
          "content": "<p>kernel only one GPUs</p>",
          "votes": 0,
          "replies": []
        },
        {
          "id": 600734,
          "author_name": "",
          "author_url": "",
          "post_date": "2019-08-16T14:04:10.703000",
          "content": "",
          "votes": 0,
          "replies": []
        },
        {
          "id": 600735,
          "author_name": "Neuron Engineer",
          "author_url": "",
          "post_date": "2019-08-16T14:04:19.983000",
          "content": "<p><a href=\"/thestonemx\">@thestonemx</a> Oscar, what do you mean by bugs?</p>\n\n<p><a href=\"https://keras.io/getting-started/faq/\">https://keras.io/getting-started/faq/</a> contains how to usw multi gpus. Though I haven't tried in this comp., but I used it on previous comp (doodle) and it worked well at that time ...</p>\n\n<p>Also as Camaro stated below, you can also used batch accumulation (e.g. try keras AdamAccumulation ..) Hope this helps!</p>",
          "votes": 0,
          "replies": []
        },
        {
          "id": 601580,
          "author_name": "",
          "author_url": "",
          "post_date": "2019-08-17T20:43:50.150000",
          "content": "",
          "votes": 0,
          "replies": []
        }
      ]
    },
    {
      "id": 598892,
      "author_name": "YILING X",
      "author_url": "",
      "post_date": "2019-08-14T07:43:07.337000",
      "content": "<p>Did you get higher score by use bigger model?</p>",
      "votes": 2,
      "replies": [
        {
          "id": 598919,
          "author_name": "Neuron Engineer",
          "author_url": "",
          "post_date": "2019-08-14T08:15:59.120000",
          "content": "<p>I just begin to experiment with these big models so it may take quite a few days to know the performance :) </p>\n\n<p><strong>EDIT</strong> at the moment, I face difficulty on make it converge nicely within the kernel…</p>\n\n<p>*<em>EDIT2 (18 / 8 / 2019) *</em> To clearly answer Oscar’s query below … I think B6 maybe suits for local training. Personally I move to other methods… Our team current LB score is not related to B6/7.</p>",
          "votes": 2,
          "replies": []
        },
        {
          "id": 601582,
          "author_name": "",
          "author_url": "",
          "post_date": "2019-08-17T20:45:53.367000",
          "content": "",
          "votes": 0,
          "replies": []
        }
      ]
    },
    {
      "id": 831685,
      "author_name": "burhanrashid",
      "author_url": "",
      "post_date": "2020-05-03T14:43:36.790000",
      "content": "<p>Hi, can anyone suggest how to use efficientNet  preprocess_input module? i  have tried the one from <a href=\"https://www.tensorflow.org/api_docs/python/tf/keras/applications/efficientnet/preprocess_input\">tensorflow</a> but did not work.</p>\n\n<p>I used the same procedure mentioned to import the model and it was successful.</p>",
      "votes": 0,
      "replies": []
    },
    {
      "id": 600261,
      "author_name": "",
      "author_url": "",
      "post_date": "2019-08-15T21:17:23.380000",
      "content": "",
      "votes": 1,
      "replies": []
    }
  ],
  "raw_markdown_by_id": {
    "598850": "In the kernel, it appears at the moment that if we use \n\n`!pip3 install efficientnet`\n\nwe will get the old 0.0.4 version\n\nSo instead use\n\n`!git clone https://github.com/qubvel/efficientnet.git`\n\nBy this we will get the latest version which has new B6/B7 implementation and pretrained weights … :)\n\nHow to use: (models can be build with Keras or Tensorflow frameworks (efficientnet.keras / efficientnet.tfkeras))\n\n`import efficientnet.keras as efn`\n\n`model = efn.EfficientNetB6(weights='imagenet')`\n\nKudos to Pavel Yakubovskiy @pavel92 for all his contributions, please give him github stars!\nhttps://github.com/qubvel\n\nNote: if you have commit errors, you can try `rm -rf efficientnet` at the end of the kernel\n\n**EDIT** Just to be clear, our team’s current LB score is not yet related to these B6/B7 experiments :) &gt;&gt; See my reply to Yiling X below ...\n",
    "600007": "Take care with the batch sizes! Using larger models allows less samples into the memory. Batch size below 16 will decrease model accuracy. If I train B5 on my 8GB GPU, then it achives lower accuracy than B3... I'm about to move to the cloud!",
    "603595": "installation of EfficientNet needs internet and after I ON internet in kaggle kernel then at the time of submission, I cann't able to submmit my csv.\nI think internet use is prohibited in this competition.\nplease help me\nthanks in advance",
    "600279": "@pavel92 Awesome work, thanks! ",
    "599918": "By using git clone won't there be any problems with submitting predictions as the kernel should be offline or is there a workaround ?",
    "599054": "i get ModuleNotFoundError: No module named 'efficientnet.keras' error when I use`import efficientnet.keras as efn\n`",
    "607455": "Thanks for the post @ratthachat \nI've added B6 and B7 weights to the kaggle dataset: https://www.kaggle.com/hmendonca/efficientnet-pytorch\nIn case anyone wants to use it on a kernel without internet\nCheers and happy kaggling! :)\n\nedit: Sorry, I have just woken up and did realised you were talking about Keras lol. Anyway, that's the tip for anyone who uses pytorch. Please also star the linked [gihub repo](https://github.com/lukemelas/EfficientNet-PyTorch/)!",
    "600561": "No matter what I do, B4+ models do not converge for me. I tried different batch sizes, optimizers, but no effect. Loss is fixed and does not change during training...\nI reached my current position with B3, that one works fine!\n\nCan someone give me a hint, what could be the issue?",
    "598892": "Did you get higher score by use bigger model?",
    "831685": "Hi, can anyone suggest how to use efficientNet  preprocess_input module? i  have tried the one from [tensorflow](https://www.tensorflow.org/api_docs/python/tf/keras/applications/efficientnet/preprocess_input) but did not work.\n\nI used the same procedure mentioned to import the model and it was successful.\n",
    "600261": ""
  }
}