{
  "id": 183281,
  "title": "Saving a model",
  "url": "/competitions/osic-pulmonary-fibrosis-progression/discussion/183281",
  "author_name": "",
  "post_date": "2020-09-16T05:50:18.251006700Z",
  "votes": 1,
  "comment_count": 1,
  "views": 0,
  "content": "<p>Im using pytorch for making my model.<br>\nI want to save the model using torch.save() but the function requires a PATH argument.<br>\nIs there any default output directory in kaggle where i can save my model?</p>",
  "messages": [
    {
      "id": "1012493",
      "postDate": "09/16/2020 05:50:18",
      "content": "<p>Im using pytorch for making my model.<br>\nI want to save the model using torch.save() but the function requires a PATH argument.<br>\nIs there any default output directory in kaggle where i can save my model?</p>",
      "rawMarkdown": "Im using pytorch for making my model.\nI want to save the model using torch.save() but the function requires a PATH argument.\nIs there any default output directory in kaggle where i can save my model?",
      "votes": null
    },
    {
      "id": "1012771",
      "postDate": "09/16/2020 09:26:06",
      "content": "<p>Just provide a name to the path argument like <code>torch.save(model.state_dict(), model_fold_0.pt')</code> and your model will be saved in the <code>/kaggle/working/</code> directory which is the default output directory.</p>",
      "rawMarkdown": "Just provide a name to the path argument like `torch.save(model.state_dict(), model_fold_0.pt')` and your model will be saved in the `/kaggle/working/` directory which is the default output directory.",
      "votes": null
    }
  ],
  "comments": [
    {
      "id": 1012771,
      "author_name": "yovinyahathugoda",
      "author_url": "",
      "post_date": "09/16/2020 09:26:06",
      "content": "<p>Just provide a name to the path argument like <code>torch.save(model.state_dict(), model_fold_0.pt')</code> and your model will be saved in the <code>/kaggle/working/</code> directory which is the default output directory.</p>",
      "votes": null,
      "replies": []
    }
  ],
  "raw_markdown_by_id": {
    "1012493": "Im using pytorch for making my model.\nI want to save the model using torch.save() but the function requires a PATH argument.\nIs there any default output directory in kaggle where i can save my model?",
    "1012771": "Just provide a name to the path argument like `torch.save(model.state_dict(), model_fold_0.pt')` and your model will be saved in the `/kaggle/working/` directory which is the default output directory."
  },
  "source": "meta"
}