{
  "id": 221026,
  "title": "How to convert pytorch pth file to h5 keras file?",
  "url": "/competitions/ranzcr-clip-catheter-line-classification/discussion/221026",
  "author_name": "",
  "post_date": "2021-02-20T16:32:26.197339Z",
  "votes": 3,
  "comment_count": 3,
  "views": 0,
  "content": "<p>I don't know how to use pytorch, but I want to use <a href=\"https://www.kaggle.com/c/ranzcr-clip-catheter-line-classification/discussion/217564\" target=\"_blank\">ChestX Starting Points</a>.  I try to use <a href=\"https://github.com/nerox8664/pytorch2keras\" target=\"_blank\">pytorch2keras</a>, but I failed. How can I do?<br>\nMaybe I should learn pytorch.</p>",
  "messages": [
    {
      "id": "1211894",
      "postDate": "02/20/2021 16:32:26",
      "content": "<p>I don't know how to use pytorch, but I want to use <a href=\"https://www.kaggle.com/c/ranzcr-clip-catheter-line-classification/discussion/217564\" target=\"_blank\">ChestX Starting Points</a>.  I try to use <a href=\"https://github.com/nerox8664/pytorch2keras\" target=\"_blank\">pytorch2keras</a>, but I failed. How can I do?<br>\nMaybe I should learn pytorch.</p>",
      "rawMarkdown": "I don't know how to use pytorch, but I want to use [ChestX Starting Points](https://www.kaggle.com/c/ranzcr-clip-catheter-line-classification/discussion/217564).  I try to use [pytorch2keras](https://github.com/nerox8664/pytorch2keras), but I failed. How can I do?\nMaybe I should learn pytorch.",
      "votes": null
    },
    {
      "id": "1213131",
      "postDate": "02/21/2021 21:15:16",
      "content": "<p><a href=\"https://www.kaggle.com/h053473666\" target=\"_blank\">@h053473666</a> did you find a way to do it?</p>",
      "rawMarkdown": "h053473666 did you find a way to do it?",
      "votes": null
    },
    {
      "id": "1213401",
      "postDate": "02/22/2021 05:16:18",
      "content": "<p>No. I try <a href=\"https://www.programmersought.com/article/18744390825/\" target=\"_blank\">https://www.programmersought.com/article/18744390825/</a> and <a href=\"https://github.com/nerox8664/pytorch2keras\" target=\"_blank\">pytorch2keras</a>, but I failed.</p>",
      "rawMarkdown": "No. I try [https://www.programmersought.com/article/18744390825/](https://www.programmersought.com/article/18744390825/) and [pytorch2keras](https://github.com/nerox8664/pytorch2keras), but I failed.",
      "votes": null
    },
    {
      "id": "1213898",
      "postDate": "02/22/2021 12:25:34",
      "content": "<p>Maybe <a href=\"https://github.com/onnx/tutorials\" target=\"_blank\">ONNX</a> can help.<br>\nOr else you can write the model definition in Keras itself, then load the weights from the PyTorch model into the Keras model (you do need to transpose the weights when you do this).</p>",
      "rawMarkdown": "Maybe [ONNX](https://github.com/onnx/tutorials) can help.\nOr else you can write the model definition in Keras itself, then load the weights from the PyTorch model into the Keras model (you do need to transpose the weights when you do this).",
      "votes": null
    }
  ],
  "comments": [
    {
      "id": 1213131,
      "author_name": "amritpal333",
      "author_url": "",
      "post_date": "02/21/2021 21:15:16",
      "content": "<p><a href=\"https://www.kaggle.com/h053473666\" target=\"_blank\">@h053473666</a> did you find a way to do it?</p>",
      "votes": null,
      "replies": [
        {
          "id": 1213401,
          "author_name": "h053473666",
          "author_url": "",
          "post_date": "02/22/2021 05:16:18",
          "content": "<p>No. I try <a href=\"https://www.programmersought.com/article/18744390825/\" target=\"_blank\">https://www.programmersought.com/article/18744390825/</a> and <a href=\"https://github.com/nerox8664/pytorch2keras\" target=\"_blank\">pytorch2keras</a>, but I failed.</p>",
          "votes": null,
          "replies": []
        }
      ]
    },
    {
      "id": 1213898,
      "author_name": "atharvaingle",
      "author_url": "",
      "post_date": "02/22/2021 12:25:34",
      "content": "<p>Maybe <a href=\"https://github.com/onnx/tutorials\" target=\"_blank\">ONNX</a> can help.<br>\nOr else you can write the model definition in Keras itself, then load the weights from the PyTorch model into the Keras model (you do need to transpose the weights when you do this).</p>",
      "votes": null,
      "replies": []
    }
  ],
  "raw_markdown_by_id": {
    "1211894": "I don't know how to use pytorch, but I want to use [ChestX Starting Points](https://www.kaggle.com/c/ranzcr-clip-catheter-line-classification/discussion/217564).  I try to use [pytorch2keras](https://github.com/nerox8664/pytorch2keras), but I failed. How can I do?\nMaybe I should learn pytorch.",
    "1213131": "h053473666 did you find a way to do it?",
    "1213401": "No. I try [https://www.programmersought.com/article/18744390825/](https://www.programmersought.com/article/18744390825/) and [pytorch2keras](https://github.com/nerox8664/pytorch2keras), but I failed.",
    "1213898": "Maybe [ONNX](https://github.com/onnx/tutorials) can help.\nOr else you can write the model definition in Keras itself, then load the weights from the PyTorch model into the Keras model (you do need to transpose the weights when you do this)."
  },
  "source": "meta"
}