{
  "id": 141058,
  "title": "Why Tpu is not being used?",
  "url": "/competitions/jigsaw-multilingual-toxic-comment-classification/discussion/141058",
  "author_name": "",
  "post_date": "2020-04-04T13:58:25.337785900Z",
  "votes": null,
  "comment_count": 2,
  "views": 0,
  "content": "<p>Here is my code:\n```\nwith strategy.scope():\n  classes = df_train.toxic.unique().tolist()\n  data = Data(df_train, df_valid, tokenizer, classes, max_seq_len=128)</p>\n\n<p>```</p>\n\n<p>Code is not using the TPU for processing the data. \nAny Help!</p>",
  "messages": [
    {
      "id": "797384",
      "postDate": "04/04/2020 13:58:25",
      "content": "<p>Here is my code:\n```\nwith strategy.scope():\n  classes = df_train.toxic.unique().tolist()\n  data = Data(df_train, df_valid, tokenizer, classes, max_seq_len=128)</p>\n\n<p>```</p>\n\n<p>Code is not using the TPU for processing the data. \nAny Help!</p>",
      "rawMarkdown": "Here is my code:\n```\nwith strategy.scope():\n  classes = df_train.toxic.unique().tolist()\n  data = Data(df_train, df_valid, tokenizer, classes, max_seq_len=128)\n\n```\n\n\nCode is not using the TPU for processing the data. \nAny Help!",
      "votes": null
    },
    {
      "id": "799800",
      "postDate": "04/06/2020 19:06:20",
      "content": "<p>The TPU is connected through PCI to a powerful host VM. The combination of those two is what is called a \"Cloud TPU\"  and that's what you are getting on Kaggle as a \"TPU accelerator\". The work on the TPU accelerator is partitioned by Tensorflow: the data pipeline runs on the CPU part, the model forward and backward pass run on the TPU hardware itself.</p>",
      "rawMarkdown": "The TPU is connected through PCI to a powerful host VM. The combination of those two is what is called a \"Cloud TPU\"  and that's what you are getting on Kaggle as a \"TPU accelerator\". The work on the TPU accelerator is partitioned by Tensorflow: the data pipeline runs on the CPU part, the model forward and backward pass run on the TPU hardware itself.",
      "votes": null
    },
    {
      "id": "799805",
      "postDate": "04/06/2020 19:10:35",
      "content": "<p>Thank you. </p>",
      "rawMarkdown": "Thank you.",
      "votes": null
    }
  ],
  "comments": [
    {
      "id": 799800,
      "author_name": "mgorner",
      "author_url": "",
      "post_date": "04/06/2020 19:06:20",
      "content": "<p>The TPU is connected through PCI to a powerful host VM. The combination of those two is what is called a \"Cloud TPU\"  and that's what you are getting on Kaggle as a \"TPU accelerator\". The work on the TPU accelerator is partitioned by Tensorflow: the data pipeline runs on the CPU part, the model forward and backward pass run on the TPU hardware itself.</p>",
      "votes": null,
      "replies": [
        {
          "id": 799805,
          "author_name": "lucca9211",
          "author_url": "",
          "post_date": "04/06/2020 19:10:35",
          "content": "<p>Thank you. </p>",
          "votes": null,
          "replies": []
        }
      ]
    }
  ],
  "raw_markdown_by_id": {
    "797384": "Here is my code:\n```\nwith strategy.scope():\n  classes = df_train.toxic.unique().tolist()\n  data = Data(df_train, df_valid, tokenizer, classes, max_seq_len=128)\n\n```\n\n\nCode is not using the TPU for processing the data. \nAny Help!",
    "799800": "The TPU is connected through PCI to a powerful host VM. The combination of those two is what is called a \"Cloud TPU\"  and that's what you are getting on Kaggle as a \"TPU accelerator\". The work on the TPU accelerator is partitioned by Tensorflow: the data pipeline runs on the CPU part, the model forward and backward pass run on the TPU hardware itself.",
    "799805": "Thank you."
  },
  "source": "meta"
}