{
  "id": 348462,
  "title": "CV:0.49 PL:0.47  PyTorch EfficientNetV2 baseline (single model)",
  "url": "/competitions/rsna-2022-cervical-spine-fracture-detection/discussion/348462",
  "author_name": "",
  "post_date": "2022-08-28T15:15:44.981680800Z",
  "votes": 40,
  "comment_count": 13,
  "views": 0,
  "content": "<p>I want to share my baseline notebooks with you. This is a bare-bones PyTorch solution with no much hyperparameter tuning. I believe you can easily drop the score down a bit with some hyperparameters magic. </p>\n<ul>\n<li>Train: <a href=\"https://www.kaggle.com/vslaykovsky/train-pytorch-effnetv2-baseline-cv-0-49\" target=\"_blank\">PyTorch-EffNetV2 baseline CV:0.49</a></li>\n<li>Inference: <a href=\"https://www.kaggle.com/code/vslaykovsky/infer-pytorch-effnetv2-single-model-pl-0-49\" target=\"_blank\">PyTorch-EffNetV2 single-model PL:0.49; 5-fold ensemble PL:0.47</a>  </li>\n</ul>\n<p>Tried to comment the solution as much as possible to make it useful for beginner ML practitioners. </p>\n<p>Hope you'll find it useful!</p>",
  "messages": [
    {
      "id": "1917244",
      "postDate": "08/28/2022 15:15:44",
      "content": "<p>I want to share my baseline notebooks with you. This is a bare-bones PyTorch solution with no much hyperparameter tuning. I believe you can easily drop the score down a bit with some hyperparameters magic. </p>\n<ul>\n<li>Train: <a href=\"https://www.kaggle.com/vslaykovsky/train-pytorch-effnetv2-baseline-cv-0-49\" target=\"_blank\">PyTorch-EffNetV2 baseline CV:0.49</a></li>\n<li>Inference: <a href=\"https://www.kaggle.com/code/vslaykovsky/infer-pytorch-effnetv2-single-model-pl-0-49\" target=\"_blank\">PyTorch-EffNetV2 single-model PL:0.49; 5-fold ensemble PL:0.47</a>  </li>\n</ul>\n<p>Tried to comment the solution as much as possible to make it useful for beginner ML practitioners. </p>\n<p>Hope you'll find it useful!</p>",
      "rawMarkdown": "I want to share my baseline notebooks with you. This is a bare-bones PyTorch solution with no much hyperparameter tuning. I believe you can easily drop the score down a bit with some hyperparameters magic. \n\n* Train: [PyTorch-EffNetV2 baseline CV:0.49](https://www.kaggle.com/vslaykovsky/train-pytorch-effnetv2-baseline-cv-0-49)\n* Inference: [PyTorch-EffNetV2 single-model PL:0.49; 5-fold ensemble PL:0.47](https://www.kaggle.com/code/vslaykovsky/infer-pytorch-effnetv2-single-model-pl-0-49)  \n\nTried to comment the solution as much as possible to make it useful for beginner ML practitioners. \n\nHope you'll find it useful!",
      "votes": null
    },
    {
      "id": "1917303",
      "postDate": "08/28/2022 16:02:31",
      "content": "<p>great work! thanks for sharing</p>",
      "rawMarkdown": "great work! thanks for sharing",
      "votes": null
    },
    {
      "id": "1917361",
      "postDate": "08/28/2022 16:57:31",
      "content": "<p>Does your \"single model\" means 1 fold or 5-folds combined?</p>",
      "rawMarkdown": "Does your \"single model\" means 1 fold or 5-folds combined?",
      "votes": null
    },
    {
      "id": "1917369",
      "postDate": "08/28/2022 17:05:03",
      "content": "<p>Nice &amp; Clean baseline. Thanks for sharing to the community.</p>",
      "rawMarkdown": "Nice & Clean baseline. Thanks for sharing to the community.",
      "votes": null
    },
    {
      "id": "1917375",
      "postDate": "08/28/2022 17:11:15",
      "content": "<p>Single model is a model that is trained on all train data folds. It is stored as 'effnetv2' in the training notebook. 5 models for each of 5 folds are also trained mainly for CV score. </p>",
      "rawMarkdown": "Single model is a model that is trained on all train data folds. It is stored as 'effnetv2' in the training notebook. 5 models for each of 5 folds are also trained mainly for CV score.",
      "votes": null
    },
    {
      "id": "1917693",
      "postDate": "08/29/2022 01:39:29",
      "content": "<p>my forked submission  timeout.</p>",
      "rawMarkdown": "my forked submission  timeout.",
      "votes": null
    },
    {
      "id": "1917896",
      "postDate": "08/29/2022 06:37:05",
      "content": "<p>Hi. This is because MODEL_NAMES was set to all models. Try to use the single model in MODEL_NAMES</p>",
      "rawMarkdown": "Hi. This is because MODEL_NAMES was set to all models. Try to use the single model in MODEL_NAMES",
      "votes": null
    },
    {
      "id": "1917924",
      "postDate": "08/29/2022 06:54:14",
      "content": "<p>Thanks for sharing. may I ask how long it took you for tranning and submission?</p>",
      "rawMarkdown": "Thanks for sharing. may I ask how long it took you for tranning and submission?",
      "votes": null
    },
    {
      "id": "1918302",
      "postDate": "08/29/2022 13:30:04",
      "content": "<p>Training locally on a laptop approx 4 hours. But a single model training is just around 1hour on a 3080 laptop. Submission is approx 3-7 hours, depends on the number of models to use</p>",
      "rawMarkdown": "Training locally on a laptop approx 4 hours. But a single model training is just around 1hour on a 3080 laptop. Submission is approx 3-7 hours, depends on the number of models to use",
      "votes": null
    },
    {
      "id": "1918319",
      "postDate": "08/29/2022 13:46:33",
      "content": "<p>Very helpful, thanks again.</p>",
      "rawMarkdown": "Very helpful, thanks again.",
      "votes": null
    },
    {
      "id": "1939085",
      "postDate": "09/14/2022 14:18:39",
      "content": "<p>How much time did it take for a single epoch ?</p>",
      "rawMarkdown": "How much time did it take for a single epoch ?",
      "votes": null
    },
    {
      "id": "1985137",
      "postDate": "10/13/2022 06:02:49",
      "content": "<p>Thanks for sharing. these codes are useful for me, but i got some trouble. <br>\n    When i run the code of train using GPU model, i got this error: AttributeError: module 'torchvision.models.efficientnet' has no attribute 'EfficientNet_V2_S_Weights'. Could you tell me how can i solve it? Thanks in advance.</p>",
      "rawMarkdown": "Thanks for sharing. these codes are useful for me, but i got some trouble. \n    When i run the code of train using GPU model, i got this error: AttributeError: module 'torchvision.models.efficientnet' has no attribute 'EfficientNet_V2_S_Weights'. Could you tell me how can i solve it? Thanks in advance.",
      "votes": null
    },
    {
      "id": "1988652",
      "postDate": "10/15/2022 13:06:40",
      "content": "<p>Hi. Make sure that the right version of Pytorch is install via <code>pip install ... .whl</code> command</p>",
      "rawMarkdown": "Hi. Make sure that the right version of Pytorch is install via `pip install ... .whl` command",
      "votes": null
    },
    {
      "id": "1989460",
      "postDate": "10/16/2022 02:17:07",
      "content": "<p>Are you using transfer learning from the pretrained model? It seems that the layers of the effnet model are not frozen.</p>",
      "rawMarkdown": "Are you using transfer learning from the pretrained model? It seems that the layers of the effnet model are not frozen.",
      "votes": null
    }
  ],
  "comments": [
    {
      "id": 1917303,
      "author_name": "dragonzhang",
      "author_url": "",
      "post_date": "08/28/2022 16:02:31",
      "content": "<p>great work! thanks for sharing</p>",
      "votes": null,
      "replies": []
    },
    {
      "id": 1917361,
      "author_name": "harshitsheoran",
      "author_url": "",
      "post_date": "08/28/2022 16:57:31",
      "content": "<p>Does your \"single model\" means 1 fold or 5-folds combined?</p>",
      "votes": null,
      "replies": [
        {
          "id": 1917375,
          "author_name": "vslaykovsky",
          "author_url": "",
          "post_date": "08/28/2022 17:11:15",
          "content": "<p>Single model is a model that is trained on all train data folds. It is stored as 'effnetv2' in the training notebook. 5 models for each of 5 folds are also trained mainly for CV score. </p>",
          "votes": null,
          "replies": []
        },
        {
          "id": 1917693,
          "author_name": "dragonzhang",
          "author_url": "",
          "post_date": "08/29/2022 01:39:29",
          "content": "<p>my forked submission  timeout.</p>",
          "votes": null,
          "replies": []
        },
        {
          "id": 1917896,
          "author_name": "vslaykovsky",
          "author_url": "",
          "post_date": "08/29/2022 06:37:05",
          "content": "<p>Hi. This is because MODEL_NAMES was set to all models. Try to use the single model in MODEL_NAMES</p>",
          "votes": null,
          "replies": []
        }
      ]
    },
    {
      "id": 1917369,
      "author_name": "nischaydnk",
      "author_url": "",
      "post_date": "08/28/2022 17:05:03",
      "content": "<p>Nice &amp; Clean baseline. Thanks for sharing to the community.</p>",
      "votes": null,
      "replies": []
    },
    {
      "id": 1917924,
      "author_name": "meli19",
      "author_url": "",
      "post_date": "08/29/2022 06:54:14",
      "content": "<p>Thanks for sharing. may I ask how long it took you for tranning and submission?</p>",
      "votes": null,
      "replies": [
        {
          "id": 1918302,
          "author_name": "vslaykovsky",
          "author_url": "",
          "post_date": "08/29/2022 13:30:04",
          "content": "<p>Training locally on a laptop approx 4 hours. But a single model training is just around 1hour on a 3080 laptop. Submission is approx 3-7 hours, depends on the number of models to use</p>",
          "votes": null,
          "replies": []
        },
        {
          "id": 1918319,
          "author_name": "meli19",
          "author_url": "",
          "post_date": "08/29/2022 13:46:33",
          "content": "<p>Very helpful, thanks again.</p>",
          "votes": null,
          "replies": []
        },
        {
          "id": 1939085,
          "author_name": "mithilsalunkhe",
          "author_url": "",
          "post_date": "09/14/2022 14:18:39",
          "content": "<p>How much time did it take for a single epoch ?</p>",
          "votes": null,
          "replies": []
        }
      ]
    },
    {
      "id": 1985137,
      "author_name": "zzl847245720",
      "author_url": "",
      "post_date": "10/13/2022 06:02:49",
      "content": "<p>Thanks for sharing. these codes are useful for me, but i got some trouble. <br>\n    When i run the code of train using GPU model, i got this error: AttributeError: module 'torchvision.models.efficientnet' has no attribute 'EfficientNet_V2_S_Weights'. Could you tell me how can i solve it? Thanks in advance.</p>",
      "votes": null,
      "replies": [
        {
          "id": 1988652,
          "author_name": "vslaykovsky",
          "author_url": "",
          "post_date": "10/15/2022 13:06:40",
          "content": "<p>Hi. Make sure that the right version of Pytorch is install via <code>pip install ... .whl</code> command</p>",
          "votes": null,
          "replies": []
        }
      ]
    },
    {
      "id": 1989460,
      "author_name": "pierretisseur",
      "author_url": "",
      "post_date": "10/16/2022 02:17:07",
      "content": "<p>Are you using transfer learning from the pretrained model? It seems that the layers of the effnet model are not frozen.</p>",
      "votes": null,
      "replies": []
    }
  ],
  "raw_markdown_by_id": {
    "1917244": "I want to share my baseline notebooks with you. This is a bare-bones PyTorch solution with no much hyperparameter tuning. I believe you can easily drop the score down a bit with some hyperparameters magic. \n\n* Train: [PyTorch-EffNetV2 baseline CV:0.49](https://www.kaggle.com/vslaykovsky/train-pytorch-effnetv2-baseline-cv-0-49)\n* Inference: [PyTorch-EffNetV2 single-model PL:0.49; 5-fold ensemble PL:0.47](https://www.kaggle.com/code/vslaykovsky/infer-pytorch-effnetv2-single-model-pl-0-49)  \n\nTried to comment the solution as much as possible to make it useful for beginner ML practitioners. \n\nHope you'll find it useful!",
    "1917303": "great work! thanks for sharing",
    "1917361": "Does your \"single model\" means 1 fold or 5-folds combined?",
    "1917369": "Nice & Clean baseline. Thanks for sharing to the community.",
    "1917375": "Single model is a model that is trained on all train data folds. It is stored as 'effnetv2' in the training notebook. 5 models for each of 5 folds are also trained mainly for CV score.",
    "1917693": "my forked submission  timeout.",
    "1917896": "Hi. This is because MODEL_NAMES was set to all models. Try to use the single model in MODEL_NAMES",
    "1917924": "Thanks for sharing. may I ask how long it took you for tranning and submission?",
    "1918302": "Training locally on a laptop approx 4 hours. But a single model training is just around 1hour on a 3080 laptop. Submission is approx 3-7 hours, depends on the number of models to use",
    "1918319": "Very helpful, thanks again.",
    "1939085": "How much time did it take for a single epoch ?",
    "1985137": "Thanks for sharing. these codes are useful for me, but i got some trouble. \n    When i run the code of train using GPU model, i got this error: AttributeError: module 'torchvision.models.efficientnet' has no attribute 'EfficientNet_V2_S_Weights'. Could you tell me how can i solve it? Thanks in advance.",
    "1988652": "Hi. Make sure that the right version of Pytorch is install via `pip install ... .whl` command",
    "1989460": "Are you using transfer learning from the pretrained model? It seems that the layers of the effnet model are not frozen."
  },
  "source": "meta"
}