{
  "id": 174735,
  "title": "What should be the steps_per_epoch for a model on TPU?",
  "url": "/competitions/siim-isic-melanoma-classification/discussion/174735",
  "author_name": "",
  "post_date": "2020-08-15T03:47:37.073338500Z",
  "votes": null,
  "comment_count": 2,
  "views": 0,
  "content": "<p>While we are training our model on TPU , what should be the steps_per-epoch.<br>\nNum_training_images / Batch_Size / REPLICAS<br>\nor <br>\nNum_training_images / Batch_Size .</p>\n<p>As in TPU , if we 8 cores , it means that we are parallelizing our training on them , so doing extra steps might lead to overfitting and will take long time .</p>\n<p>Let me know if i am correct in this too.<br>\nThank You.</p>",
  "messages": [
    {
      "id": "970965",
      "postDate": "08/15/2020 03:47:37",
      "content": "<p>While we are training our model on TPU , what should be the steps_per-epoch.<br>\nNum_training_images / Batch_Size / REPLICAS<br>\nor <br>\nNum_training_images / Batch_Size .</p>\n<p>As in TPU , if we 8 cores , it means that we are parallelizing our training on them , so doing extra steps might lead to overfitting and will take long time .</p>\n<p>Let me know if i am correct in this too.<br>\nThank You.</p>",
      "rawMarkdown": "While we are training our model on TPU , what should be the steps_per-epoch.\nNum_training_images / Batch_Size / REPLICAS\nor \nNum_training_images / Batch_Size .\n\nAs in TPU , if we 8 cores , it means that we are parallelizing our training on them , so doing extra steps might lead to overfitting and will take long time .\n\nLet me know if i am correct in this too.\nThank You.",
      "votes": null
    },
    {
      "id": "970969",
      "postDate": "08/15/2020 03:50:58",
      "content": "<p>It depend on what you use for <code>ds = ds.batch(batch_size * REPLICAS)</code>. Whatever you use there is your denominator. </p>\n<p>(So, in the above case, use <code>Num_training_images / Batch_Size / REPLICAS</code>)</p>",
      "rawMarkdown": "It depend on what you use for `ds = ds.batch(batch_size * REPLICAS)`. Whatever you use there is your denominator. \n\n(So, in the above case, use `Num_training_images / Batch_Size / REPLICAS`)",
      "votes": null
    },
    {
      "id": "970973",
      "postDate": "08/15/2020 03:54:21",
      "content": "<p>Thank You <a href=\"https://www.kaggle.com/cdeotte\" target=\"_blank\">@cdeotte</a>  , i got it.</p>",
      "rawMarkdown": "Thank You @cdeotte  , i got it.",
      "votes": null
    }
  ],
  "comments": [
    {
      "id": 970969,
      "author_name": "cdeotte",
      "author_url": "",
      "post_date": "08/15/2020 03:50:58",
      "content": "<p>It depend on what you use for <code>ds = ds.batch(batch_size * REPLICAS)</code>. Whatever you use there is your denominator. </p>\n<p>(So, in the above case, use <code>Num_training_images / Batch_Size / REPLICAS</code>)</p>",
      "votes": null,
      "replies": [
        {
          "id": 970973,
          "author_name": "prashantarorat",
          "author_url": "",
          "post_date": "08/15/2020 03:54:21",
          "content": "<p>Thank You <a href=\"https://www.kaggle.com/cdeotte\" target=\"_blank\">@cdeotte</a>  , i got it.</p>",
          "votes": null,
          "replies": []
        }
      ]
    }
  ],
  "raw_markdown_by_id": {
    "970965": "While we are training our model on TPU , what should be the steps_per-epoch.\nNum_training_images / Batch_Size / REPLICAS\nor \nNum_training_images / Batch_Size .\n\nAs in TPU , if we 8 cores , it means that we are parallelizing our training on them , so doing extra steps might lead to overfitting and will take long time .\n\nLet me know if i am correct in this too.\nThank You.",
    "970969": "It depend on what you use for `ds = ds.batch(batch_size * REPLICAS)`. Whatever you use there is your denominator. \n\n(So, in the above case, use `Num_training_images / Batch_Size / REPLICAS`)",
    "970973": "Thank You @cdeotte  , i got it."
  },
  "source": "meta"
}