{
  "id": 219379,
  "title": "Question: 11 labels individually training and gradient vanishing on certain labels",
  "url": "/competitions/ranzcr-clip-catheter-line-classification/discussion/219379",
  "author_name": "",
  "post_date": "2021-02-14T17:34:46.250158600Z",
  "votes": 1,
  "comment_count": 2,
  "views": 0,
  "content": "<p>Hi, I am a newone to machine learning. Here is a question that I can't figure out and hope someone could share their experiences. I trained the 11 classes with 11 labels, so that the code return the inference of one class at a time. It looks normal when choose 'ETT - Normal', which give the accuracy around 0.91 after 60 epochs, however when I executed 'CVC - Borderline', my code gave no help on raising the accuracy beyond expectation number and val_acc didnt change at all.(The model returns only 0 in fact, so it might be c``aused by gradient vanishing??)</p>\n<p>Here is the code :)<br>\ntargetCol==2 for 'ETT - Normal'<br>\ntargetCol==8 for 'CVC - Borderline'<br>\n<a href=\"url\" target=\"_blank\">https://github.com/shengwenyuan/Ranzcr</a></p>",
  "messages": [
    {
      "id": "1200467",
      "postDate": "02/14/2021 17:34:46",
      "content": "<p>Hi, I am a newone to machine learning. Here is a question that I can't figure out and hope someone could share their experiences. I trained the 11 classes with 11 labels, so that the code return the inference of one class at a time. It looks normal when choose 'ETT - Normal', which give the accuracy around 0.91 after 60 epochs, however when I executed 'CVC - Borderline', my code gave no help on raising the accuracy beyond expectation number and val_acc didnt change at all.(The model returns only 0 in fact, so it might be c``aused by gradient vanishing??)</p>\n<p>Here is the code :)<br>\ntargetCol==2 for 'ETT - Normal'<br>\ntargetCol==8 for 'CVC - Borderline'<br>\n<a href=\"url\" target=\"_blank\">https://github.com/shengwenyuan/Ranzcr</a></p>",
      "rawMarkdown": "Hi, I am a newone to machine learning. Here is a question that I can't figure out and hope someone could share their experiences. I trained the 11 classes with 11 labels, so that the code return the inference of one class at a time. It looks normal when choose 'ETT - Normal', which give the accuracy around 0.91 after 60 epochs, however when I executed 'CVC - Borderline', my code gave no help on raising the accuracy beyond expectation number and val_acc didnt change at all.(The model returns only 0 in fact, so it might be c``aused by gradient vanishing??)\n\nHere is the code :)\ntargetCol==2 for 'ETT - Normal'\ntargetCol==8 for 'CVC - Borderline'\n[https://github.com/shengwenyuan/Ranzcr](url)",
      "votes": null
    },
    {
      "id": "1215664",
      "postDate": "02/23/2021 21:00:01",
      "content": "<p>You need to provide more detail for the error.</p>",
      "rawMarkdown": "You need to provide more detail for the error.",
      "votes": null
    },
    {
      "id": "1215790",
      "postDate": "02/24/2021 00:28:16",
      "content": "<p>It's possible you need <code>ReLU()</code> and <code>BatchNorm2d()</code> layers after your initial convolution and before the resnet. Resnets, like most image models, expect their input to be within a certain range. This is range is typically 0-1, then normalised with <code>mean = [0.485, 0.456, 0.406], std = [0.229, 0.224, 0.225]</code>.</p>\n<p>If you have a raw convolution layer before the resnet, it could be receiving input values that are far too large/small. Personally, I do not recommend putting an additional convolution before the resnet input. If you want 3-channel input then you can either load the images as RGB or use feature engineering to fill the other 2 channels with something.</p>",
      "rawMarkdown": "It's possible you need `ReLU()` and `BatchNorm2d()` layers after your initial convolution and before the resnet. Resnets, like most image models, expect their input to be within a certain range. This is range is typically 0-1, then normalised with `mean = [0.485, 0.456, 0.406], std = [0.229, 0.224, 0.225]`.\n\nIf you have a raw convolution layer before the resnet, it could be receiving input values that are far too large/small. Personally, I do not recommend putting an additional convolution before the resnet input. If you want 3-channel input then you can either load the images as RGB or use feature engineering to fill the other 2 channels with something.",
      "votes": null
    }
  ],
  "comments": [
    {
      "id": 1215664,
      "author_name": "amritpal333",
      "author_url": "",
      "post_date": "02/23/2021 21:00:01",
      "content": "<p>You need to provide more detail for the error.</p>",
      "votes": null,
      "replies": []
    },
    {
      "id": 1215790,
      "author_name": "bigironsphere",
      "author_url": "",
      "post_date": "02/24/2021 00:28:16",
      "content": "<p>It's possible you need <code>ReLU()</code> and <code>BatchNorm2d()</code> layers after your initial convolution and before the resnet. Resnets, like most image models, expect their input to be within a certain range. This is range is typically 0-1, then normalised with <code>mean = [0.485, 0.456, 0.406], std = [0.229, 0.224, 0.225]</code>.</p>\n<p>If you have a raw convolution layer before the resnet, it could be receiving input values that are far too large/small. Personally, I do not recommend putting an additional convolution before the resnet input. If you want 3-channel input then you can either load the images as RGB or use feature engineering to fill the other 2 channels with something.</p>",
      "votes": null,
      "replies": []
    }
  ],
  "raw_markdown_by_id": {
    "1200467": "Hi, I am a newone to machine learning. Here is a question that I can't figure out and hope someone could share their experiences. I trained the 11 classes with 11 labels, so that the code return the inference of one class at a time. It looks normal when choose 'ETT - Normal', which give the accuracy around 0.91 after 60 epochs, however when I executed 'CVC - Borderline', my code gave no help on raising the accuracy beyond expectation number and val_acc didnt change at all.(The model returns only 0 in fact, so it might be c``aused by gradient vanishing??)\n\nHere is the code :)\ntargetCol==2 for 'ETT - Normal'\ntargetCol==8 for 'CVC - Borderline'\n[https://github.com/shengwenyuan/Ranzcr](url)",
    "1215664": "You need to provide more detail for the error.",
    "1215790": "It's possible you need `ReLU()` and `BatchNorm2d()` layers after your initial convolution and before the resnet. Resnets, like most image models, expect their input to be within a certain range. This is range is typically 0-1, then normalised with `mean = [0.485, 0.456, 0.406], std = [0.229, 0.224, 0.225]`.\n\nIf you have a raw convolution layer before the resnet, it could be receiving input values that are far too large/small. Personally, I do not recommend putting an additional convolution before the resnet input. If you want 3-channel input then you can either load the images as RGB or use feature engineering to fill the other 2 channels with something."
  },
  "source": "meta"
}