{
  "id": 198596,
  "title": "TPU does not work with TF greater than 2.2!",
  "url": "/competitions/cassava-leaf-disease-classification/discussion/198596",
  "author_name": "",
  "post_date": "2020-11-22T02:31:31.386094Z",
  "votes": 5,
  "comment_count": 4,
  "views": 0,
  "content": "<p>As a side note: TPU does not work with TF greater than 2.2. This is a big handicap, because EfficientNet was introduced in 2.3</p>\n<p>To overcome this problem, I made the EfficientNet dataset compatible with TF 2.2: <a href=\"https://www.kaggle.com/aeryss/tfkeras-22-pretrained-and-vanilla-efficientnet\" target=\"_blank\">https://www.kaggle.com/aeryss/tfkeras-22-pretrained-and-vanilla-efficientnet</a></p>\n<p>Use this line to load your model: <code>model = tf.keras.models.load_model(\".../TF2.2_[Name]_[A]_[B].h5\")</code> where <code>[Name]</code> is the model's name, <code>[A]</code> is either <code>Top</code> or <code>NoTop</code> and <code>[B]</code> is either <code>ImageNet</code> or <code>None</code>.</p>\n<p>For example, to load the EfficientNetB7 without top and ImageNet weights: <code>model = tf.keras.models.load_model(\".../TF2.2_EfficientNetB7_NoTop_ImageNet.h5\")</code></p>\n<p>Tested successfully using TPU.</p>",
  "messages": [
    {
      "id": "1086745",
      "postDate": "11/22/2020 02:31:31",
      "content": "<p>As a side note: TPU does not work with TF greater than 2.2. This is a big handicap, because EfficientNet was introduced in 2.3</p>\n<p>To overcome this problem, I made the EfficientNet dataset compatible with TF 2.2: <a href=\"https://www.kaggle.com/aeryss/tfkeras-22-pretrained-and-vanilla-efficientnet\" target=\"_blank\">https://www.kaggle.com/aeryss/tfkeras-22-pretrained-and-vanilla-efficientnet</a></p>\n<p>Use this line to load your model: <code>model = tf.keras.models.load_model(\".../TF2.2_[Name]_[A]_[B].h5\")</code> where <code>[Name]</code> is the model's name, <code>[A]</code> is either <code>Top</code> or <code>NoTop</code> and <code>[B]</code> is either <code>ImageNet</code> or <code>None</code>.</p>\n<p>For example, to load the EfficientNetB7 without top and ImageNet weights: <code>model = tf.keras.models.load_model(\".../TF2.2_EfficientNetB7_NoTop_ImageNet.h5\")</code></p>\n<p>Tested successfully using TPU.</p>",
      "rawMarkdown": "As a side note: TPU does not work with TF greater than 2.2. This is a big handicap, because EfficientNet was introduced in 2.3\n\nTo overcome this problem, I made the EfficientNet dataset compatible with TF 2.2: https://www.kaggle.com/aeryss/tfkeras-22-pretrained-and-vanilla-efficientnet\n\nUse this line to load your model: `model = tf.keras.models.load_model(\".../TF2.2_[Name]_[A]_[B].h5\")` where `[Name]` is the model's name, `[A]` is either `Top` or `NoTop` and `[B]` is either `ImageNet` or `None`.\n\nFor example, to load the EfficientNetB7 without top and ImageNet weights: `model = tf.keras.models.load_model(\".../TF2.2_EfficientNetB7_NoTop_ImageNet.h5\")`\n\nTested successfully using TPU.",
      "votes": null
    },
    {
      "id": "1087169",
      "postDate": "11/22/2020 12:30:36",
      "content": "<p>A question to Kaggle staff: is there any plan to update TF to 2.3 for TPU instances? In Google Colab it is already using TF 2.3…</p>",
      "rawMarkdown": "A question to Kaggle staff: is there any plan to update TF to 2.3 for TPU instances? In Google Colab it is already using TF 2.3...",
      "votes": null
    },
    {
      "id": "1087170",
      "postDate": "11/22/2020 12:33:51",
      "content": "<p>If I am not mistaken, a while ago when they updated to the TF 2.3 version, TPUs environments were having memory issues, maybe the issue was not corrected yet.</p>",
      "rawMarkdown": "If I am not mistaken, a while ago when they updated to the TF 2.3 version, TPUs environments were having memory issues, maybe the issue was not corrected yet.",
      "votes": null
    },
    {
      "id": "1088596",
      "postDate": "11/23/2020 19:25:11",
      "content": "<p>Hi, good question. As another user pointed out, we released TF2.3 and saw a number of memory issues. We attempted another release of TF2.3.1 and continued to encounter stability issues. Therefore, we've decided to wait until the GA release of TF2.4. Sorry for this inconvenience, but we hope to see 2.4 released within the next couple weeks!</p>",
      "rawMarkdown": "Hi, good question. As another user pointed out, we released TF2.3 and saw a number of memory issues. We attempted another release of TF2.3.1 and continued to encounter stability issues. Therefore, we've decided to wait until the GA release of TF2.4. Sorry for this inconvenience, but we hope to see 2.4 released within the next couple weeks!",
      "votes": null
    },
    {
      "id": "1089388",
      "postDate": "11/24/2020 13:07:42",
      "content": "<p><a href=\"https://www.kaggle.com/aeryss\" target=\"_blank\">@aeryss</a> I faced this problem when I wrote a TPU notebook on differential privacy in MOA competition . Thanks for bringing it to the attention of Kaggle Staff </p>",
      "rawMarkdown": "aeryss I faced this problem when I wrote a TPU notebook on differential privacy in MOA competition . Thanks for bringing it to the attention of Kaggle Staff",
      "votes": null
    }
  ],
  "comments": [
    {
      "id": 1087169,
      "author_name": "benayas",
      "author_url": "",
      "post_date": "11/22/2020 12:30:36",
      "content": "<p>A question to Kaggle staff: is there any plan to update TF to 2.3 for TPU instances? In Google Colab it is already using TF 2.3…</p>",
      "votes": null,
      "replies": []
    },
    {
      "id": 1087170,
      "author_name": "dimitreoliveira",
      "author_url": "",
      "post_date": "11/22/2020 12:33:51",
      "content": "<p>If I am not mistaken, a while ago when they updated to the TF 2.3 version, TPUs environments were having memory issues, maybe the issue was not corrected yet.</p>",
      "votes": null,
      "replies": []
    },
    {
      "id": 1088596,
      "author_name": "juliaelliott",
      "author_url": "",
      "post_date": "11/23/2020 19:25:11",
      "content": "<p>Hi, good question. As another user pointed out, we released TF2.3 and saw a number of memory issues. We attempted another release of TF2.3.1 and continued to encounter stability issues. Therefore, we've decided to wait until the GA release of TF2.4. Sorry for this inconvenience, but we hope to see 2.4 released within the next couple weeks!</p>",
      "votes": null,
      "replies": []
    },
    {
      "id": 1089388,
      "author_name": "usharengaraju",
      "author_url": "",
      "post_date": "11/24/2020 13:07:42",
      "content": "<p><a href=\"https://www.kaggle.com/aeryss\" target=\"_blank\">@aeryss</a> I faced this problem when I wrote a TPU notebook on differential privacy in MOA competition . Thanks for bringing it to the attention of Kaggle Staff </p>",
      "votes": null,
      "replies": []
    }
  ],
  "raw_markdown_by_id": {
    "1086745": "As a side note: TPU does not work with TF greater than 2.2. This is a big handicap, because EfficientNet was introduced in 2.3\n\nTo overcome this problem, I made the EfficientNet dataset compatible with TF 2.2: https://www.kaggle.com/aeryss/tfkeras-22-pretrained-and-vanilla-efficientnet\n\nUse this line to load your model: `model = tf.keras.models.load_model(\".../TF2.2_[Name]_[A]_[B].h5\")` where `[Name]` is the model's name, `[A]` is either `Top` or `NoTop` and `[B]` is either `ImageNet` or `None`.\n\nFor example, to load the EfficientNetB7 without top and ImageNet weights: `model = tf.keras.models.load_model(\".../TF2.2_EfficientNetB7_NoTop_ImageNet.h5\")`\n\nTested successfully using TPU.",
    "1087169": "A question to Kaggle staff: is there any plan to update TF to 2.3 for TPU instances? In Google Colab it is already using TF 2.3...",
    "1087170": "If I am not mistaken, a while ago when they updated to the TF 2.3 version, TPUs environments were having memory issues, maybe the issue was not corrected yet.",
    "1088596": "Hi, good question. As another user pointed out, we released TF2.3 and saw a number of memory issues. We attempted another release of TF2.3.1 and continued to encounter stability issues. Therefore, we've decided to wait until the GA release of TF2.4. Sorry for this inconvenience, but we hope to see 2.4 released within the next couple weeks!",
    "1089388": "aeryss I faced this problem when I wrote a TPU notebook on differential privacy in MOA competition . Thanks for bringing it to the attention of Kaggle Staff"
  },
  "source": "meta"
}