{
  "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": "Vladimir Slaykovskiy",
  "post_date": "2022-08-28T15:15:44.981000",
  "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": "2022-08-28T15:15:44.983Z",
      "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": 39
    },
    {
      "id": 1989460,
      "postDate": "2022-10-16T02:17:07.313Z",
      "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": 1
    },
    {
      "id": 1917924,
      "postDate": "2022-08-29T06:54:14.683Z",
      "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": 1,
      "replies": [
        {
          "id": 1918302,
          "postDate": "2022-08-29T13:30:04.953Z",
          "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": 2
        },
        {
          "id": 1918319,
          "postDate": "2022-08-29T13:46:33.877Z",
          "content": "<p>Very helpful, thanks again.</p>",
          "rawMarkdown": "Very helpful, thanks again.",
          "votes": 1
        },
        {
          "id": 1939085,
          "postDate": "2022-09-14T14:18:39.033Z",
          "content": "<p>How much time did it take for a single epoch ?</p>",
          "rawMarkdown": "How much time did it take for a single epoch ?"
        }
      ]
    },
    {
      "id": 1917361,
      "postDate": "2022-08-28T16:57:31.297Z",
      "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": 1,
      "replies": [
        {
          "id": 1917375,
          "postDate": "2022-08-28T17:11:15.337Z",
          "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. "
        },
        {
          "id": 1917693,
          "postDate": "2022-08-29T01:39:29.170Z",
          "content": "<p>my forked submission  timeout.</p>",
          "rawMarkdown": "my forked submission  timeout.",
          "votes": 1
        },
        {
          "id": 1917896,
          "postDate": "2022-08-29T06:37:05.467Z",
          "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"
        }
      ]
    },
    {
      "id": 1917369,
      "postDate": "2022-08-28T17:05:03.513Z",
      "content": "<p>Nice &amp; Clean baseline. Thanks for sharing to the community.</p>",
      "rawMarkdown": "Nice & Clean baseline. Thanks for sharing to the community.",
      "votes": 2
    },
    {
      "id": 1985137,
      "postDate": "2022-10-13T06:02:49.800Z",
      "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.",
      "replies": [
        {
          "id": 1988652,
          "postDate": "2022-10-15T13:06:40.767Z",
          "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"
        }
      ]
    },
    {
      "id": 1917303,
      "postDate": "2022-08-28T16:02:31.950Z",
      "content": "<p>great work! thanks for sharing</p>",
      "rawMarkdown": "great work! thanks for sharing",
      "votes": 1
    }
  ],
  "comments": [
    {
      "id": 1989460,
      "author_name": "Pierre Tisseur",
      "author_url": "",
      "post_date": "2022-10-16T02:17:07.313000",
      "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": 1,
      "replies": []
    },
    {
      "id": 1917924,
      "author_name": "Mengfei Li",
      "author_url": "",
      "post_date": "2022-08-29T06:54:14.683000",
      "content": "<p>Thanks for sharing. may I ask how long it took you for tranning and submission?</p>",
      "votes": 1,
      "replies": [
        {
          "id": 1918302,
          "author_name": "Vladimir Slaykovskiy",
          "author_url": "",
          "post_date": "2022-08-29T13:30:04.953000",
          "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": 2,
          "replies": []
        },
        {
          "id": 1918319,
          "author_name": "Mengfei Li",
          "author_url": "",
          "post_date": "2022-08-29T13:46:33.877000",
          "content": "<p>Very helpful, thanks again.</p>",
          "votes": 1,
          "replies": []
        },
        {
          "id": 1939085,
          "author_name": "Mithil Salunkhe",
          "author_url": "",
          "post_date": "2022-09-14T14:18:39.033000",
          "content": "<p>How much time did it take for a single epoch ?</p>",
          "votes": 0,
          "replies": []
        }
      ]
    },
    {
      "id": 1917361,
      "author_name": "Harshit Sheoran",
      "author_url": "",
      "post_date": "2022-08-28T16:57:31.297000",
      "content": "<p>Does your \"single model\" means 1 fold or 5-folds combined?</p>",
      "votes": 1,
      "replies": [
        {
          "id": 1917375,
          "author_name": "Vladimir Slaykovskiy",
          "author_url": "",
          "post_date": "2022-08-28T17:11:15.337000",
          "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": 0,
          "replies": []
        },
        {
          "id": 1917693,
          "author_name": "dragon zhang",
          "author_url": "",
          "post_date": "2022-08-29T01:39:29.170000",
          "content": "<p>my forked submission  timeout.</p>",
          "votes": 1,
          "replies": []
        },
        {
          "id": 1917896,
          "author_name": "Vladimir Slaykovskiy",
          "author_url": "",
          "post_date": "2022-08-29T06:37:05.467000",
          "content": "<p>Hi. This is because MODEL_NAMES was set to all models. Try to use the single model in MODEL_NAMES</p>",
          "votes": 0,
          "replies": []
        }
      ]
    },
    {
      "id": 1917369,
      "author_name": "Nischay Dhankhar",
      "author_url": "",
      "post_date": "2022-08-28T17:05:03.513000",
      "content": "<p>Nice &amp; Clean baseline. Thanks for sharing to the community.</p>",
      "votes": 2,
      "replies": []
    },
    {
      "id": 1985137,
      "author_name": "Zhuolin Zhang",
      "author_url": "",
      "post_date": "2022-10-13T06:02:49.800000",
      "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": 0,
      "replies": [
        {
          "id": 1988652,
          "author_name": "Vladimir Slaykovskiy",
          "author_url": "",
          "post_date": "2022-10-15T13:06:40.767000",
          "content": "<p>Hi. Make sure that the right version of Pytorch is install via <code>pip install ... .whl</code> command</p>",
          "votes": 0,
          "replies": []
        }
      ]
    },
    {
      "id": 1917303,
      "author_name": "dragon zhang",
      "author_url": "",
      "post_date": "2022-08-28T16:02:31.950000",
      "content": "<p>great work! thanks for sharing</p>",
      "votes": 1,
      "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!",
    "1989460": "Are you using transfer learning from the pretrained model? It seems that the layers of the effnet model are not frozen.",
    "1917924": "Thanks for sharing. may I ask how long it took you for tranning and submission?",
    "1917361": "Does your \"single model\" means 1 fold or 5-folds combined?",
    "1917369": "Nice & Clean baseline. Thanks for sharing to the community.",
    "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.",
    "1917303": "great work! thanks for sharing"
  }
}