{
  "id": 150628,
  "title": "Question about saving models",
  "url": "/competitions/flower-classification-with-tpus/discussion/150628",
  "author_name": "",
  "post_date": "2020-05-12T21:52:51.069645200Z",
  "votes": 3,
  "comment_count": 1,
  "views": 0,
  "content": "<p>When using TPU on Kaggle, I know we can use <code>save_weights()</code> if the model is not a subclassed model. I still wonder if it would be possible soon to save checkpoints or model weights even if the model is a subclassed model.</p>",
  "messages": [
    {
      "id": "844816",
      "postDate": "05/12/2020 21:52:51",
      "content": "<p>When using TPU on Kaggle, I know we can use <code>save_weights()</code> if the model is not a subclassed model. I still wonder if it would be possible soon to save checkpoints or model weights even if the model is a subclassed model.</p>",
      "rawMarkdown": "When using TPU on Kaggle, I know we can use `save_weights()` if the model is not a subclassed model. I still wonder if it would be possible soon to save checkpoints or model weights even if the model is a subclassed model.",
      "votes": null
    },
    {
      "id": "844884",
      "postDate": "05/12/2020 22:52:26",
      "content": "<p>I confirm that saving model and checkpoints from TPU to local disk only works using the Keras HDF5 format. Saving in the newer \"Tensorflow Saved Model\" format from TPU to local disk is currently buggy. Saving in \"TF Saved Model\" format from TPU to GCS works though. You can use that on GCP. Not on Kaggle unfortunately because Kaggle notebooks do not have access to a writable GCS location.</p>",
      "rawMarkdown": "I confirm that saving model and checkpoints from TPU to local disk only works using the Keras HDF5 format. Saving in the newer \"Tensorflow Saved Model\" format from TPU to local disk is currently buggy. Saving in \"TF Saved Model\" format from TPU to GCS works though. You can use that on GCP. Not on Kaggle unfortunately because Kaggle notebooks do not have access to a writable GCS location.",
      "votes": null
    }
  ],
  "comments": [
    {
      "id": 844884,
      "author_name": "mgorner",
      "author_url": "",
      "post_date": "05/12/2020 22:52:26",
      "content": "<p>I confirm that saving model and checkpoints from TPU to local disk only works using the Keras HDF5 format. Saving in the newer \"Tensorflow Saved Model\" format from TPU to local disk is currently buggy. Saving in \"TF Saved Model\" format from TPU to GCS works though. You can use that on GCP. Not on Kaggle unfortunately because Kaggle notebooks do not have access to a writable GCS location.</p>",
      "votes": null,
      "replies": []
    }
  ],
  "raw_markdown_by_id": {
    "844816": "When using TPU on Kaggle, I know we can use `save_weights()` if the model is not a subclassed model. I still wonder if it would be possible soon to save checkpoints or model weights even if the model is a subclassed model.",
    "844884": "I confirm that saving model and checkpoints from TPU to local disk only works using the Keras HDF5 format. Saving in the newer \"Tensorflow Saved Model\" format from TPU to local disk is currently buggy. Saving in \"TF Saved Model\" format from TPU to GCS works though. You can use that on GCP. Not on Kaggle unfortunately because Kaggle notebooks do not have access to a writable GCS location."
  },
  "source": "meta"
}