{
  "id": 409561,
  "title": "Can I use PyTorch for this competition?",
  "url": "/competitions/asl-fingerspelling/discussion/409561",
  "author_name": "",
  "post_date": "2023-05-11T15:46:16.004253100Z",
  "votes": 6,
  "comment_count": 6,
  "views": 0,
  "content": "<p>Hi, I'm familiar with Pytorch, but not with Tensorflow much.<br>\nAm I have to learn TF for this competition?  (actually, I have a plan to get GCP certificate during 2023)</p>\n<p>Or … I wonder if there is a way how to use PyTorch with TFLite compatibly..</p>",
  "messages": [
    {
      "id": "2255251",
      "postDate": "05/11/2023 15:46:16",
      "content": "<p>Hi, I'm familiar with Pytorch, but not with Tensorflow much.<br>\nAm I have to learn TF for this competition?  (actually, I have a plan to get GCP certificate during 2023)</p>\n<p>Or … I wonder if there is a way how to use PyTorch with TFLite compatibly..</p>",
      "rawMarkdown": "Hi, I'm familiar with Pytorch, but not with Tensorflow much.\nAm I have to learn TF for this competition?  (actually, I have a plan to get GCP certificate during 2023)\n\nOr ... I wonder if there is a way how to use PyTorch with TFLite compatibly..",
      "votes": null
    },
    {
      "id": "2255310",
      "postDate": "05/11/2023 16:28:48",
      "content": "<p>well, I think you can, but it is a little complex:</p>\n<ol>\n<li>You need to save model as onnx</li>\n<li>convert onnx to tf model</li>\n<li>from tf to tflite</li>\n</ol>",
      "rawMarkdown": "well, I think you can, but it is a little complex:\n1. You need to save model as onnx\n2. convert onnx to tf model\n3. from tf to tflite",
      "votes": null
    },
    {
      "id": "2255329",
      "postDate": "05/11/2023 16:41:21",
      "content": "<p><a href=\"https://www.kaggle.com/dwchen\" target=\"_blank\">@dwchen</a> is correct. You can train your model using any framework you want as long as the final model can be converted to tflite.</p>",
      "rawMarkdown": "dwchen is correct. You can train your model using any framework you want as long as the final model can be converted to tflite.",
      "votes": null
    },
    {
      "id": "2255695",
      "postDate": "05/11/2023 23:40:15",
      "content": "<p>Okay, thank you for the answers!! :D</p>",
      "rawMarkdown": "Okay, thank you for the answers!! :D",
      "votes": null
    },
    {
      "id": "2255969",
      "postDate": "05/12/2023 06:51:09",
      "content": "<p>You could follow <a href=\"https://www.kaggle.com/dwchen\" target=\"_blank\">@dwchen</a> scheme to craft your submission. In the end, you may wonder to rewrite your PyTorch model in TensorFlow from scratch and then just migrate weights to it. I've seen guys who gain a significant performance boost doing that.</p>",
      "rawMarkdown": "You could follow @dwchen scheme to craft your submission. In the end, you may wonder to rewrite your PyTorch model in TensorFlow from scratch and then just migrate weights to it. I've seen guys who gain a significant performance boost doing that.",
      "votes": null
    },
    {
      "id": "2256287",
      "postDate": "05/12/2023 11:21:12",
      "content": "<p>I follow him up now. Thank you for suggesting :)</p>",
      "rawMarkdown": "I follow him up now. Thank you for suggesting :)",
      "votes": null
    },
    {
      "id": "2285937",
      "postDate": "06/03/2023 05:41:49",
      "content": "<p><a href=\"https://www.kaggle.com/dwchen\" target=\"_blank\">@dwchen</a> how to make the conversion? any docs for doing this?</p>",
      "rawMarkdown": "dwchen how to make the conversion? any docs for doing this?",
      "votes": null
    }
  ],
  "comments": [
    {
      "id": 2255310,
      "author_name": "dwchen",
      "author_url": "",
      "post_date": "05/11/2023 16:28:48",
      "content": "<p>well, I think you can, but it is a little complex:</p>\n<ol>\n<li>You need to save model as onnx</li>\n<li>convert onnx to tf model</li>\n<li>from tf to tflite</li>\n</ol>",
      "votes": null,
      "replies": [
        {
          "id": 2255329,
          "author_name": "sohier",
          "author_url": "",
          "post_date": "05/11/2023 16:41:21",
          "content": "<p><a href=\"https://www.kaggle.com/dwchen\" target=\"_blank\">@dwchen</a> is correct. You can train your model using any framework you want as long as the final model can be converted to tflite.</p>",
          "votes": null,
          "replies": []
        },
        {
          "id": 2255695,
          "author_name": "eugeneryu",
          "author_url": "",
          "post_date": "05/11/2023 23:40:15",
          "content": "<p>Okay, thank you for the answers!! :D</p>",
          "votes": null,
          "replies": []
        },
        {
          "id": 2285937,
          "author_name": "sparkyjunior",
          "author_url": "",
          "post_date": "06/03/2023 05:41:49",
          "content": "<p><a href=\"https://www.kaggle.com/dwchen\" target=\"_blank\">@dwchen</a> how to make the conversion? any docs for doing this?</p>",
          "votes": null,
          "replies": []
        }
      ]
    },
    {
      "id": 2255969,
      "author_name": "meowmeowmeowmeowmeow",
      "author_url": "",
      "post_date": "05/12/2023 06:51:09",
      "content": "<p>You could follow <a href=\"https://www.kaggle.com/dwchen\" target=\"_blank\">@dwchen</a> scheme to craft your submission. In the end, you may wonder to rewrite your PyTorch model in TensorFlow from scratch and then just migrate weights to it. I've seen guys who gain a significant performance boost doing that.</p>",
      "votes": null,
      "replies": [
        {
          "id": 2256287,
          "author_name": "eugeneryu",
          "author_url": "",
          "post_date": "05/12/2023 11:21:12",
          "content": "<p>I follow him up now. Thank you for suggesting :)</p>",
          "votes": null,
          "replies": []
        }
      ]
    }
  ],
  "raw_markdown_by_id": {
    "2255251": "Hi, I'm familiar with Pytorch, but not with Tensorflow much.\nAm I have to learn TF for this competition?  (actually, I have a plan to get GCP certificate during 2023)\n\nOr ... I wonder if there is a way how to use PyTorch with TFLite compatibly..",
    "2255310": "well, I think you can, but it is a little complex:\n1. You need to save model as onnx\n2. convert onnx to tf model\n3. from tf to tflite",
    "2255329": "dwchen is correct. You can train your model using any framework you want as long as the final model can be converted to tflite.",
    "2255695": "Okay, thank you for the answers!! :D",
    "2255969": "You could follow @dwchen scheme to craft your submission. In the end, you may wonder to rewrite your PyTorch model in TensorFlow from scratch and then just migrate weights to it. I've seen guys who gain a significant performance boost doing that.",
    "2256287": "I follow him up now. Thank you for suggesting :)",
    "2285937": "dwchen how to make the conversion? any docs for doing this?"
  },
  "source": "meta"
}