{
  "id": 409561,
  "title": "Can I use PyTorch for this competition?",
  "url": "/competitions/asl-fingerspelling/discussion/409561",
  "author_name": "Eugene J. Ryu",
  "post_date": "2023-05-11T15:46:16.004000",
  "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": "2023-05-11T15:46:16.003Z",
      "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": 6
    },
    {
      "id": 2255310,
      "postDate": "2023-05-11T16:28:48.397Z",
      "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\n",
      "votes": 1,
      "replies": [
        {
          "id": 2255329,
          "postDate": "2023-05-11T16:41:21.780Z",
          "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": 2
        },
        {
          "id": 2255695,
          "postDate": "2023-05-11T23:40:15.520Z",
          "content": "<p>Okay, thank you for the answers!! :D</p>",
          "rawMarkdown": "Okay, thank you for the answers!! :D"
        },
        {
          "id": 2285937,
          "postDate": "2023-06-03T05:41:49.867Z",
          "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?"
        }
      ]
    },
    {
      "id": 2255969,
      "postDate": "2023-05-12T06:51:09.023Z",
      "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.\n",
      "votes": 2,
      "replies": [
        {
          "id": 2256287,
          "postDate": "2023-05-12T11:21:12.740Z",
          "content": "<p>I follow him up now. Thank you for suggesting :)</p>",
          "rawMarkdown": "I follow him up now. Thank you for suggesting :)"
        }
      ]
    }
  ],
  "comments": [
    {
      "id": 2255310,
      "author_name": "Dewei Chen",
      "author_url": "",
      "post_date": "2023-05-11T16:28:48.397000",
      "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": 1,
      "replies": [
        {
          "id": 2255329,
          "author_name": "Sohier Dane",
          "author_url": "",
          "post_date": "2023-05-11T16:41:21.780000",
          "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": 2,
          "replies": []
        },
        {
          "id": 2255695,
          "author_name": "Eugene J. Ryu",
          "author_url": "",
          "post_date": "2023-05-11T23:40:15.520000",
          "content": "<p>Okay, thank you for the answers!! :D</p>",
          "votes": 0,
          "replies": []
        },
        {
          "id": 2285937,
          "author_name": "JINO ROHIT",
          "author_url": "",
          "post_date": "2023-06-03T05:41:49.867000",
          "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": 0,
          "replies": []
        }
      ]
    },
    {
      "id": 2255969,
      "author_name": "Mykola",
      "author_url": "",
      "post_date": "2023-05-12T06:51:09.023000",
      "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": 2,
      "replies": [
        {
          "id": 2256287,
          "author_name": "Eugene J. Ryu",
          "author_url": "",
          "post_date": "2023-05-12T11:21:12.740000",
          "content": "<p>I follow him up now. Thank you for suggesting :)</p>",
          "votes": 0,
          "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\n",
    "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.\n"
  }
}