{
  "id": 142392,
  "title": "InvalidArgumentError: Unsuccessful TensorSliceReader ",
  "url": "/competitions/jigsaw-multilingual-toxic-comment-classification/discussion/142392",
  "author_name": "",
  "post_date": "2020-04-10T08:56:42.102777Z",
  "votes": null,
  "comment_count": 4,
  "views": 0,
  "content": "<h1>Error when using TPU with Tensorflow Hub</h1>\n\n<p><a href=\"https://www.kaggle.com/lucca9211/jigsaw-multilingual-getting-started\">My Notebook Having Error</a></p>",
  "messages": [
    {
      "id": "803220",
      "postDate": "04/10/2020 08:56:42",
      "content": "<h1>Error when using TPU with Tensorflow Hub</h1>\n\n<p><a href=\"https://www.kaggle.com/lucca9211/jigsaw-multilingual-getting-started\">My Notebook Having Error</a></p>",
      "rawMarkdown": "# Error when using TPU with Tensorflow Hub\n\n[My Notebook Having Error](https://www.kaggle.com/lucca9211/jigsaw-multilingual-getting-started)",
      "votes": null
    },
    {
      "id": "803705",
      "postDate": "04/10/2020 19:17:06",
      "content": "<p><code>\nbert_layer = hub.KerasLayer(\"https://tfhub.dev/tensorflow/bert_multi_cased_L-12_H-768_A-12/1\",trainable=True)\n</code>\nSorry, this does not work yet on TF 2.1 on TPUs because of a bug. You have to load the model in 2 steps, as in the <a href=\"https://www.kaggle.com/kivlichangoogle/jigsaw-multilingual-getting-started\">getting started notebook</a>:</p>\n\n<p>```\nbert_layer = tf.saved_model.load(BERT_GCS_PATH_SAVEDMODEL)\nbert_layer = hub.KerasLayer(bert_layer, trainable=trainable_bert)</p>\n\n<p>```</p>",
      "rawMarkdown": "```\nbert_layer = hub.KerasLayer(\"https://tfhub.dev/tensorflow/bert_multi_cased_L-12_H-768_A-12/1\",trainable=True)\n```\nSorry, this does not work yet on TF 2.1 on TPUs because of a bug. You have to load the model in 2 steps, as in the [getting started notebook](https://www.kaggle.com/kivlichangoogle/jigsaw-multilingual-getting-started):\n\n```\nbert_layer = tf.saved_model.load(BERT_GCS_PATH_SAVEDMODEL)\nbert_layer = hub.KerasLayer(bert_layer, trainable=trainable_bert)\n\n```",
      "votes": null
    },
    {
      "id": "803716",
      "postDate": "04/10/2020 19:28:51",
      "content": "<p>In that case Do I need to use Google Cloud Storage for TPU training.\nBecause error is</p>\n\n<p>Unimplemented: File system scheme '[local]' not implemented</p>",
      "rawMarkdown": "In that case Do I need to use Google Cloud Storage for TPU training.\nBecause error is\n\nUnimplemented: File system scheme '[local]' not implemented",
      "votes": null
    },
    {
      "id": "803728",
      "postDate": "04/10/2020 19:40:17",
      "content": "<p>yes, just as in the <a href=\"https://www.kaggle.com/kivlichangoogle/jigsaw-multilingual-getting-started\">Getting started notebook</a>. Apologies for the bad user experience here. We are trying to fix this in TF 2.2.</p>",
      "rawMarkdown": "yes, just as in the [Getting started notebook](https://www.kaggle.com/kivlichangoogle/jigsaw-multilingual-getting-started). Apologies for the bad user experience here. We are trying to fix this in TF 2.2.",
      "votes": null
    },
    {
      "id": "803732",
      "postDate": "04/10/2020 19:42:52",
      "content": "<p>Ok Thank you Sir</p>",
      "rawMarkdown": "Ok Thank you Sir",
      "votes": null
    }
  ],
  "comments": [
    {
      "id": 803705,
      "author_name": "mgorner",
      "author_url": "",
      "post_date": "04/10/2020 19:17:06",
      "content": "<p><code>\nbert_layer = hub.KerasLayer(\"https://tfhub.dev/tensorflow/bert_multi_cased_L-12_H-768_A-12/1\",trainable=True)\n</code>\nSorry, this does not work yet on TF 2.1 on TPUs because of a bug. You have to load the model in 2 steps, as in the <a href=\"https://www.kaggle.com/kivlichangoogle/jigsaw-multilingual-getting-started\">getting started notebook</a>:</p>\n\n<p>```\nbert_layer = tf.saved_model.load(BERT_GCS_PATH_SAVEDMODEL)\nbert_layer = hub.KerasLayer(bert_layer, trainable=trainable_bert)</p>\n\n<p>```</p>",
      "votes": null,
      "replies": [
        {
          "id": 803716,
          "author_name": "lucca9211",
          "author_url": "",
          "post_date": "04/10/2020 19:28:51",
          "content": "<p>In that case Do I need to use Google Cloud Storage for TPU training.\nBecause error is</p>\n\n<p>Unimplemented: File system scheme '[local]' not implemented</p>",
          "votes": null,
          "replies": []
        },
        {
          "id": 803728,
          "author_name": "mgorner",
          "author_url": "",
          "post_date": "04/10/2020 19:40:17",
          "content": "<p>yes, just as in the <a href=\"https://www.kaggle.com/kivlichangoogle/jigsaw-multilingual-getting-started\">Getting started notebook</a>. Apologies for the bad user experience here. We are trying to fix this in TF 2.2.</p>",
          "votes": null,
          "replies": []
        },
        {
          "id": 803732,
          "author_name": "lucca9211",
          "author_url": "",
          "post_date": "04/10/2020 19:42:52",
          "content": "<p>Ok Thank you Sir</p>",
          "votes": null,
          "replies": []
        }
      ]
    }
  ],
  "raw_markdown_by_id": {
    "803220": "# Error when using TPU with Tensorflow Hub\n\n[My Notebook Having Error](https://www.kaggle.com/lucca9211/jigsaw-multilingual-getting-started)",
    "803705": "```\nbert_layer = hub.KerasLayer(\"https://tfhub.dev/tensorflow/bert_multi_cased_L-12_H-768_A-12/1\",trainable=True)\n```\nSorry, this does not work yet on TF 2.1 on TPUs because of a bug. You have to load the model in 2 steps, as in the [getting started notebook](https://www.kaggle.com/kivlichangoogle/jigsaw-multilingual-getting-started):\n\n```\nbert_layer = tf.saved_model.load(BERT_GCS_PATH_SAVEDMODEL)\nbert_layer = hub.KerasLayer(bert_layer, trainable=trainable_bert)\n\n```",
    "803716": "In that case Do I need to use Google Cloud Storage for TPU training.\nBecause error is\n\nUnimplemented: File system scheme '[local]' not implemented",
    "803728": "yes, just as in the [Getting started notebook](https://www.kaggle.com/kivlichangoogle/jigsaw-multilingual-getting-started). Apologies for the bad user experience here. We are trying to fix this in TF 2.2.",
    "803732": "Ok Thank you Sir"
  },
  "source": "meta"
}