{
  "id": 237645,
  "title": "Friendly Reminder Showing Additional EfficientNET Keras/TF Resources",
  "url": "/competitions/bms-molecular-translation/discussion/237645",
  "author_name": "Darien Schettler",
  "post_date": "2021-05-09T15:25:01.240000",
  "votes": 8,
  "comment_count": 0,
  "views": 0,
  "content": "<p>Hi there. I recently came across this (I was using <a href=\"https://github.com/qubvel/efficientnet\" target=\"_blank\">qubvel</a> previously). It was new to me but is probably old news to most of you. That being said I wanted to share.</p>\n<p>You can find the official Efficientnet model repo here -&gt; <a href=\"https://github.com/tensorflow/tpu/tree/master/models/official/efficientnet\" target=\"_blank\">link</a></p>\n<p>If you want to use something like <strong>noisy-student</strong> weights (there are other alternatives in the repo too) you simply need to do the following:</p>\n<hr>\n<p><strong>Step 1: Download and unzip</strong></p>\n<pre><code>!wget https://storage.googleapis.com/cloud-tpu-checkpoints/efficientnet \\ \n      /noisystudent/noisy_student_efficientnet-b5.tar.gz\n!tar -xf noisy_student_efficientnet-b5.tar.gz\n</code></pre>\n<p><br></p>\n<p><strong>Step 2: Use The <code>efficientnet_weight_update_util.py</code> Script To Convert The Ckpt File To An h5 File</strong></p>\n<pre><code>!python efficientnet_weight_update_util.py --model b5 --notop --ckpt \\\n        efficientnet-b5/model.ckpt --o efficientnetb5_notop.h5\n</code></pre>\n<p><br></p>\n<p><strong>Step 3: Load the Weights By Providing the Correct Path</strong></p>\n<pre><code>model = EfficientNetB5(weights=\"efficientnetb5_notop.h5\", include_top=False)\n</code></pre>\n<hr>\n<p>Hope this helps someone!</p>",
  "messages": [
    {
      "id": 1299297,
      "postDate": "2021-05-09T15:25:01.240Z",
      "content": "<p>Hi there. I recently came across this (I was using <a href=\"https://github.com/qubvel/efficientnet\" target=\"_blank\">qubvel</a> previously). It was new to me but is probably old news to most of you. That being said I wanted to share.</p>\n<p>You can find the official Efficientnet model repo here -&gt; <a href=\"https://github.com/tensorflow/tpu/tree/master/models/official/efficientnet\" target=\"_blank\">link</a></p>\n<p>If you want to use something like <strong>noisy-student</strong> weights (there are other alternatives in the repo too) you simply need to do the following:</p>\n<hr>\n<p><strong>Step 1: Download and unzip</strong></p>\n<pre><code>!wget https://storage.googleapis.com/cloud-tpu-checkpoints/efficientnet \\ \n      /noisystudent/noisy_student_efficientnet-b5.tar.gz\n!tar -xf noisy_student_efficientnet-b5.tar.gz\n</code></pre>\n<p><br></p>\n<p><strong>Step 2: Use The <code>efficientnet_weight_update_util.py</code> Script To Convert The Ckpt File To An h5 File</strong></p>\n<pre><code>!python efficientnet_weight_update_util.py --model b5 --notop --ckpt \\\n        efficientnet-b5/model.ckpt --o efficientnetb5_notop.h5\n</code></pre>\n<p><br></p>\n<p><strong>Step 3: Load the Weights By Providing the Correct Path</strong></p>\n<pre><code>model = EfficientNetB5(weights=\"efficientnetb5_notop.h5\", include_top=False)\n</code></pre>\n<hr>\n<p>Hope this helps someone!</p>",
      "rawMarkdown": "Hi there. I recently came across this (I was using [qubvel](https://github.com/qubvel/efficientnet) previously). It was new to me but is probably old news to most of you. That being said I wanted to share.\n\nYou can find the official Efficientnet model repo here -> [link](https://github.com/tensorflow/tpu/tree/master/models/official/efficientnet)\n\nIf you want to use something like **noisy-student** weights (there are other alternatives in the repo too) you simply need to do the following:\n\n---\n\n**Step 1: Download and unzip**\n\n```\n!wget https://storage.googleapis.com/cloud-tpu-checkpoints/efficientnet \\ \n      /noisystudent/noisy_student_efficientnet-b5.tar.gz\n!tar -xf noisy_student_efficientnet-b5.tar.gz\n```\n\n<br>\n\n**Step 2: Use The `efficientnet_weight_update_util.py` Script To Convert The Ckpt File To An h5 File**\n\n```\n!python efficientnet_weight_update_util.py --model b5 --notop --ckpt \\\n        efficientnet-b5/model.ckpt --o efficientnetb5_notop.h5\n```\n\n<br>\n\n**Step 3: Load the Weights By Providing the Correct Path**\n\n```python\nmodel = EfficientNetB5(weights=\"efficientnetb5_notop.h5\", include_top=False)\n```\n\n---\n\nHope this helps someone!",
      "votes": 8
    }
  ],
  "comments": [],
  "raw_markdown_by_id": {
    "1299297": "Hi there. I recently came across this (I was using [qubvel](https://github.com/qubvel/efficientnet) previously). It was new to me but is probably old news to most of you. That being said I wanted to share.\n\nYou can find the official Efficientnet model repo here -> [link](https://github.com/tensorflow/tpu/tree/master/models/official/efficientnet)\n\nIf you want to use something like **noisy-student** weights (there are other alternatives in the repo too) you simply need to do the following:\n\n---\n\n**Step 1: Download and unzip**\n\n```\n!wget https://storage.googleapis.com/cloud-tpu-checkpoints/efficientnet \\ \n      /noisystudent/noisy_student_efficientnet-b5.tar.gz\n!tar -xf noisy_student_efficientnet-b5.tar.gz\n```\n\n<br>\n\n**Step 2: Use The `efficientnet_weight_update_util.py` Script To Convert The Ckpt File To An h5 File**\n\n```\n!python efficientnet_weight_update_util.py --model b5 --notop --ckpt \\\n        efficientnet-b5/model.ckpt --o efficientnetb5_notop.h5\n```\n\n<br>\n\n**Step 3: Load the Weights By Providing the Correct Path**\n\n```python\nmodel = EfficientNetB5(weights=\"efficientnetb5_notop.h5\", include_top=False)\n```\n\n---\n\nHope this helps someone!"
  }
}