{
  "id": 199617,
  "title": "[Summary] 42nd place - What I did briefly, Single Model",
  "url": "/competitions/lyft-motion-prediction-autonomous-vehicles/discussion/199617",
  "author_name": "Heroseo",
  "post_date": "2020-11-26T13:22:54.919000",
  "votes": 13,
  "comment_count": 8,
  "views": 0,
  "content": "<h1>Intro</h1>\n<p>I joined this competition late. It was difficult to try many things.<br>\nSo, I tried a few things.<br>\n(Maybe my solution is too simple. :) )</p>\n<h1>First Step</h1>\n<p>My first goal was to be in the top 100.<br>\nI used Resnet18 and train_full.zarr that have 224 raster_size.</p>\n<p>I got <strong>20.56</strong> lb score after about <code>80,000</code> steps.</p>\n<h1>Second Step - Switch to Resnet34</h1>\n<p>I got <strong>19.23</strong> after <code>25,000</code> steps. The performance has been greatly improved.<br>\nSo, I trained more steps and finally got 15.080.</p>\n<p>Ensemble using public kernel's way didn't work for me.<br>\nAnd ensemble using a simple average way with same model helped public and private lb.<br>\n(But I didn't have many models. So, I used basic one and weights averaged model i.e. polyak.)</p>\n<ul>\n<li>I got public lb score of <strong>14.91</strong> </li>\n</ul>\n<h1>Third Step - Switch to Resnet50</h1>\n<p>2 days ago I switched my baseline model to resnet50.<br>\nWhen I trained resnet50, I found the interesting part between valid score and public lb.</p>\n<p>After <code>50,000</code> steps, public lb was <strong>19.132</strong> that it is bad compared to resnet34. But valid score is a pretty good.</p>\n<ul>\n<li><strong>12.504</strong></li>\n</ul>\n<p>I checked resnet34 and got a little bad valid score.</p>\n<ul>\n<li><strong>16.66</strong></li>\n</ul>\n<p>And also I observed mean loss when I trained resnet50.<br>\n<img src=\"https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F3492127%2F33dd4f76a9b3e7f7a1d29a9f859e80fb%2F1.png?generation=1606395471230692&amp;alt=media\" alt=\"\"><br>\n[<code>Left</code>: When <code>57,000</code> steps - 19.194 loss, <code>Right</code>: <code>60,000</code> steps - 19.089 loss]</p>\n<p>In that points, lb scores are:<br>\n<img src=\"https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F3492127%2Fe307542c1bcee60540d08583a092e717%2F2.png?generation=1606396024722504&amp;alt=media\" alt=\"\"></p>\n<p>I just trained resnet50 after <code>100,000</code> steps and got public lb score <strong>16.076</strong>.<br>\n(I have no time for training. haha)</p>\n<h1>Final</h1>\n<p>I selected resnet34 and resnet50.<br>\n<img src=\"https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F3492127%2Fcf29ed6aadd3b67951817754a9691fbe%2F3.png?generation=1606396517653027&amp;alt=media\" alt=\"\"></p>\n<p>As you can see, resnet50 got better private lb despite public lb score.<br>\n(I wasn't sure, so I didn't choose the ensemble model.)</p>\n<h1>Etc.</h1>\n<p>I did some other experiments such as raster size - 300 and finetuning model using high raster size, but It is not good for me. Single model is best. haha<br>\nI tried <a href=\"https://www.kaggle.com/pestipeti\" target=\"_blank\">@pestipeti</a> advices for improving training speed but my hardware is not good for this. (no spaces and no time) Anyway, Thanks all. :)</p>",
  "messages": [
    {
      "id": 1092009,
      "postDate": "2020-11-26T13:22:54.920Z",
      "content": "<h1>Intro</h1>\n<p>I joined this competition late. It was difficult to try many things.<br>\nSo, I tried a few things.<br>\n(Maybe my solution is too simple. :) )</p>\n<h1>First Step</h1>\n<p>My first goal was to be in the top 100.<br>\nI used Resnet18 and train_full.zarr that have 224 raster_size.</p>\n<p>I got <strong>20.56</strong> lb score after about <code>80,000</code> steps.</p>\n<h1>Second Step - Switch to Resnet34</h1>\n<p>I got <strong>19.23</strong> after <code>25,000</code> steps. The performance has been greatly improved.<br>\nSo, I trained more steps and finally got 15.080.</p>\n<p>Ensemble using public kernel's way didn't work for me.<br>\nAnd ensemble using a simple average way with same model helped public and private lb.<br>\n(But I didn't have many models. So, I used basic one and weights averaged model i.e. polyak.)</p>\n<ul>\n<li>I got public lb score of <strong>14.91</strong> </li>\n</ul>\n<h1>Third Step - Switch to Resnet50</h1>\n<p>2 days ago I switched my baseline model to resnet50.<br>\nWhen I trained resnet50, I found the interesting part between valid score and public lb.</p>\n<p>After <code>50,000</code> steps, public lb was <strong>19.132</strong> that it is bad compared to resnet34. But valid score is a pretty good.</p>\n<ul>\n<li><strong>12.504</strong></li>\n</ul>\n<p>I checked resnet34 and got a little bad valid score.</p>\n<ul>\n<li><strong>16.66</strong></li>\n</ul>\n<p>And also I observed mean loss when I trained resnet50.<br>\n<img src=\"https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F3492127%2F33dd4f76a9b3e7f7a1d29a9f859e80fb%2F1.png?generation=1606395471230692&amp;alt=media\" alt=\"\"><br>\n[<code>Left</code>: When <code>57,000</code> steps - 19.194 loss, <code>Right</code>: <code>60,000</code> steps - 19.089 loss]</p>\n<p>In that points, lb scores are:<br>\n<img src=\"https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F3492127%2Fe307542c1bcee60540d08583a092e717%2F2.png?generation=1606396024722504&amp;alt=media\" alt=\"\"></p>\n<p>I just trained resnet50 after <code>100,000</code> steps and got public lb score <strong>16.076</strong>.<br>\n(I have no time for training. haha)</p>\n<h1>Final</h1>\n<p>I selected resnet34 and resnet50.<br>\n<img src=\"https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F3492127%2Fcf29ed6aadd3b67951817754a9691fbe%2F3.png?generation=1606396517653027&amp;alt=media\" alt=\"\"></p>\n<p>As you can see, resnet50 got better private lb despite public lb score.<br>\n(I wasn't sure, so I didn't choose the ensemble model.)</p>\n<h1>Etc.</h1>\n<p>I did some other experiments such as raster size - 300 and finetuning model using high raster size, but It is not good for me. Single model is best. haha<br>\nI tried <a href=\"https://www.kaggle.com/pestipeti\" target=\"_blank\">@pestipeti</a> advices for improving training speed but my hardware is not good for this. (no spaces and no time) Anyway, Thanks all. :)</p>",
      "rawMarkdown": "# Intro\nI joined this competition late. It was difficult to try many things.\nSo, I tried a few things.\n(Maybe my solution is too simple. :) )\n\n\n# First Step\nMy first goal was to be in the top 100.\nI used Resnet18 and train_full.zarr that have 224 raster_size.\n\nI got **20.56** lb score after about `80,000` steps.\n\n\n# Second Step - Switch to Resnet34\nI got **19.23** after `25,000` steps. The performance has been greatly improved.\nSo, I trained more steps and finally got 15.080.\n\nEnsemble using public kernel's way didn't work for me.\nAnd ensemble using a simple average way with same model helped public and private lb.\n(But I didn't have many models. So, I used basic one and weights averaged model i.e. polyak.)\n\n- I got public lb score of **14.91** \n\n\n\n# Third Step - Switch to Resnet50\n2 days ago I switched my baseline model to resnet50.\nWhen I trained resnet50, I found the interesting part between valid score and public lb.\n\nAfter `50,000` steps, public lb was **19.132** that it is bad compared to resnet34. But valid score is a pretty good.\n- **12.504**\n\nI checked resnet34 and got a little bad valid score.\n- **16.66**\n\nAnd also I observed mean loss when I trained resnet50.\n![](https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F3492127%2F33dd4f76a9b3e7f7a1d29a9f859e80fb%2F1.png?generation=1606395471230692&alt=media)\n[`Left`: When `57,000` steps - 19.194 loss, `Right`: `60,000` steps - 19.089 loss]\n\nIn that points, lb scores are:\n![](https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F3492127%2Fe307542c1bcee60540d08583a092e717%2F2.png?generation=1606396024722504&alt=media)\n\nI just trained resnet50 after `100,000` steps and got public lb score **16.076**.\n(I have no time for training. haha)\n\n# Final\nI selected resnet34 and resnet50.\n![](https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F3492127%2Fcf29ed6aadd3b67951817754a9691fbe%2F3.png?generation=1606396517653027&alt=media)\n\nAs you can see, resnet50 got better private lb despite public lb score.\n(I wasn't sure, so I didn't choose the ensemble model.)\n\n# Etc.\nI did some other experiments such as raster size - 300 and finetuning model using high raster size, but It is not good for me. Single model is best. haha\nI tried @pestipeti advices for improving training speed but my hardware is not good for this. (no spaces and no time) Anyway, Thanks all. :)",
      "votes": 13
    },
    {
      "id": 1092478,
      "postDate": "2020-11-26T21:16:34.050Z",
      "content": "<p>Great job! What was the batch size that you used?</p>",
      "rawMarkdown": "Great job! What was the batch size that you used?",
      "votes": 1,
      "replies": [
        {
          "id": 1093355,
          "postDate": "2020-11-27T16:30:21.413Z",
          "content": "<p>I used 256 batch size for train. :)<br>\n<a href=\"https://www.kaggle.com/louis925\" target=\"_blank\">@louis925</a> </p>",
          "rawMarkdown": "I used 256 batch size for train. :)\n@louis925 ",
          "votes": 1
        },
        {
          "id": 1093509,
          "postDate": "2020-11-27T19:38:37.987Z",
          "content": "<p>I see! Looks like larger batch size is really important.</p>",
          "rawMarkdown": "I see! Looks like larger batch size is really important.",
          "votes": 1
        },
        {
          "id": 1093519,
          "postDate": "2020-11-27T19:41:22.740Z",
          "content": "<p>I just trained 100,000 steps. Maybe I trained model more. lb score is much higher I think</p>",
          "rawMarkdown": "I just trained 100,000 steps. Maybe I trained model more. lb score is much higher I think"
        }
      ]
    },
    {
      "id": 1092234,
      "postDate": "2020-11-26T16:25:40.650Z",
      "rawMarkdown": "",
      "votes": 1,
      "isDeleted": true,
      "replies": [
        {
          "id": 1092254,
          "postDate": "2020-11-26T16:40:41.023Z",
          "content": "<ol>\n<li><p>Yes, it is a single model.</p></li>\n<li><p>Opt - Adam<br>\nlr - 1e5 that is initial and I used linear schedule with warmup. I also tried other lr scheduler i.e. CosineAnnealingWarmRestarts but it is not good for me.</p></li>\n</ol>\n<p><a href=\"https://www.kaggle.com/kramadhari\" target=\"_blank\">@kramadhari</a> </p>",
          "rawMarkdown": "1. Yes, it is a single model.\n\n2. \nOpt - Adam\nlr - 1e5 that is initial and I used linear schedule with warmup. I also tried other lr scheduler i.e. CosineAnnealingWarmRestarts but it is not good for me.\n\n@kramadhari "
        },
        {
          "id": 1092488,
          "postDate": "2020-11-26T21:54:08.353Z",
          "rawMarkdown": "",
          "isDeleted": true
        },
        {
          "id": 1092785,
          "postDate": "2020-11-27T06:55:31.410Z",
          "content": "<p>please, see 'linear schedule with warmup' haha <a href=\"https://www.kaggle.com/kramadhari\" target=\"_blank\">@kramadhari</a> </p>",
          "rawMarkdown": "please, see 'linear schedule with warmup' haha @kramadhari "
        }
      ]
    }
  ],
  "comments": [
    {
      "id": 1092478,
      "author_name": "Louis Yang",
      "author_url": "",
      "post_date": "2020-11-26T21:16:34.050000",
      "content": "<p>Great job! What was the batch size that you used?</p>",
      "votes": 1,
      "replies": [
        {
          "id": 1093355,
          "author_name": "Heroseo",
          "author_url": "",
          "post_date": "2020-11-27T16:30:21.413000",
          "content": "<p>I used 256 batch size for train. :)<br>\n<a href=\"https://www.kaggle.com/louis925\" target=\"_blank\">@louis925</a> </p>",
          "votes": 1,
          "replies": []
        },
        {
          "id": 1093509,
          "author_name": "Louis Yang",
          "author_url": "",
          "post_date": "2020-11-27T19:38:37.987000",
          "content": "<p>I see! Looks like larger batch size is really important.</p>",
          "votes": 1,
          "replies": []
        },
        {
          "id": 1093519,
          "author_name": "Heroseo",
          "author_url": "",
          "post_date": "2020-11-27T19:41:22.740000",
          "content": "<p>I just trained 100,000 steps. Maybe I trained model more. lb score is much higher I think</p>",
          "votes": 0,
          "replies": []
        }
      ]
    },
    {
      "id": 1092234,
      "author_name": "",
      "author_url": "",
      "post_date": "2020-11-26T16:25:40.650000",
      "content": "",
      "votes": 1,
      "replies": [
        {
          "id": 1092254,
          "author_name": "Heroseo",
          "author_url": "",
          "post_date": "2020-11-26T16:40:41.023000",
          "content": "<ol>\n<li><p>Yes, it is a single model.</p></li>\n<li><p>Opt - Adam<br>\nlr - 1e5 that is initial and I used linear schedule with warmup. I also tried other lr scheduler i.e. CosineAnnealingWarmRestarts but it is not good for me.</p></li>\n</ol>\n<p><a href=\"https://www.kaggle.com/kramadhari\" target=\"_blank\">@kramadhari</a> </p>",
          "votes": 0,
          "replies": []
        },
        {
          "id": 1092488,
          "author_name": "",
          "author_url": "",
          "post_date": "2020-11-26T21:54:08.353000",
          "content": "",
          "votes": 0,
          "replies": []
        },
        {
          "id": 1092785,
          "author_name": "Heroseo",
          "author_url": "",
          "post_date": "2020-11-27T06:55:31.410000",
          "content": "<p>please, see 'linear schedule with warmup' haha <a href=\"https://www.kaggle.com/kramadhari\" target=\"_blank\">@kramadhari</a> </p>",
          "votes": 0,
          "replies": []
        }
      ]
    }
  ],
  "raw_markdown_by_id": {
    "1092009": "# Intro\nI joined this competition late. It was difficult to try many things.\nSo, I tried a few things.\n(Maybe my solution is too simple. :) )\n\n\n# First Step\nMy first goal was to be in the top 100.\nI used Resnet18 and train_full.zarr that have 224 raster_size.\n\nI got **20.56** lb score after about `80,000` steps.\n\n\n# Second Step - Switch to Resnet34\nI got **19.23** after `25,000` steps. The performance has been greatly improved.\nSo, I trained more steps and finally got 15.080.\n\nEnsemble using public kernel's way didn't work for me.\nAnd ensemble using a simple average way with same model helped public and private lb.\n(But I didn't have many models. So, I used basic one and weights averaged model i.e. polyak.)\n\n- I got public lb score of **14.91** \n\n\n\n# Third Step - Switch to Resnet50\n2 days ago I switched my baseline model to resnet50.\nWhen I trained resnet50, I found the interesting part between valid score and public lb.\n\nAfter `50,000` steps, public lb was **19.132** that it is bad compared to resnet34. But valid score is a pretty good.\n- **12.504**\n\nI checked resnet34 and got a little bad valid score.\n- **16.66**\n\nAnd also I observed mean loss when I trained resnet50.\n![](https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F3492127%2F33dd4f76a9b3e7f7a1d29a9f859e80fb%2F1.png?generation=1606395471230692&alt=media)\n[`Left`: When `57,000` steps - 19.194 loss, `Right`: `60,000` steps - 19.089 loss]\n\nIn that points, lb scores are:\n![](https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F3492127%2Fe307542c1bcee60540d08583a092e717%2F2.png?generation=1606396024722504&alt=media)\n\nI just trained resnet50 after `100,000` steps and got public lb score **16.076**.\n(I have no time for training. haha)\n\n# Final\nI selected resnet34 and resnet50.\n![](https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F3492127%2Fcf29ed6aadd3b67951817754a9691fbe%2F3.png?generation=1606396517653027&alt=media)\n\nAs you can see, resnet50 got better private lb despite public lb score.\n(I wasn't sure, so I didn't choose the ensemble model.)\n\n# Etc.\nI did some other experiments such as raster size - 300 and finetuning model using high raster size, but It is not good for me. Single model is best. haha\nI tried @pestipeti advices for improving training speed but my hardware is not good for this. (no spaces and no time) Anyway, Thanks all. :)",
    "1092478": "Great job! What was the batch size that you used?",
    "1092234": ""
  }
}