{
  "id": 76631,
  "title": "How to Use pre-trained model/transfer learning for 3+ depth?",
  "url": "/competitions/human-protein-atlas-image-classification/discussion/76631",
  "author_name": "",
  "post_date": "2019-01-05T01:43:53.411192800Z",
  "votes": 1,
  "comment_count": 1,
  "views": 0,
  "content": "<p>How do we use pretrained networks, for example on imagenet on more than 3 depth images? For example, for the first convolution, the pretrained weights of the filters, is [5,5,3,1] for example, 5x5 filter depth 3 and stride 1. So if we gave it a image of [16,16,4] of depth 4, there is no pretrained weights for the 4th dimension for the convolution?</p>\n\n<p>Thanks for the help!</p>",
  "messages": [
    {
      "id": "450457",
      "postDate": "01/05/2019 01:43:53",
      "content": "<p>How do we use pretrained networks, for example on imagenet on more than 3 depth images? For example, for the first convolution, the pretrained weights of the filters, is [5,5,3,1] for example, 5x5 filter depth 3 and stride 1. So if we gave it a image of [16,16,4] of depth 4, there is no pretrained weights for the 4th dimension for the convolution?</p>\n\n<p>Thanks for the help!</p>",
      "rawMarkdown": "How do we use pretrained networks, for example on imagenet on more than 3 depth images? For example, for the first convolution, the pretrained weights of the filters, is [5,5,3,1] for example, 5x5 filter depth 3 and stride 1. So if we gave it a image of [16,16,4] of depth 4, there is no pretrained weights for the 4th dimension for the convolution?\n\nThanks for the help!",
      "votes": null
    },
    {
      "id": "450708",
      "postDate": "01/05/2019 14:56:41",
      "content": "<p>The easiest way (and there are public kernels doing this) is to load a pretrained model as normal, then you change the first convolution layer to accept a 4 channel input. You can keep the same weights on the 3 pre-existing channels and initialize the new channel with a standard weight initializer like Xavier, Dirac, etc. or you can also copy the weights from one of the pretrained channels to the new one</p>",
      "rawMarkdown": "The easiest way (and there are public kernels doing this) is to load a pretrained model as normal, then you change the first convolution layer to accept a 4 channel input. You can keep the same weights on the 3 pre-existing channels and initialize the new channel with a standard weight initializer like Xavier, Dirac, etc. or you can also copy the weights from one of the pretrained channels to the new one",
      "votes": null
    }
  ],
  "comments": [
    {
      "id": 450708,
      "author_name": "dr1t10",
      "author_url": "",
      "post_date": "01/05/2019 14:56:41",
      "content": "<p>The easiest way (and there are public kernels doing this) is to load a pretrained model as normal, then you change the first convolution layer to accept a 4 channel input. You can keep the same weights on the 3 pre-existing channels and initialize the new channel with a standard weight initializer like Xavier, Dirac, etc. or you can also copy the weights from one of the pretrained channels to the new one</p>",
      "votes": null,
      "replies": []
    }
  ],
  "raw_markdown_by_id": {
    "450457": "How do we use pretrained networks, for example on imagenet on more than 3 depth images? For example, for the first convolution, the pretrained weights of the filters, is [5,5,3,1] for example, 5x5 filter depth 3 and stride 1. So if we gave it a image of [16,16,4] of depth 4, there is no pretrained weights for the 4th dimension for the convolution?\n\nThanks for the help!",
    "450708": "The easiest way (and there are public kernels doing this) is to load a pretrained model as normal, then you change the first convolution layer to accept a 4 channel input. You can keep the same weights on the 3 pre-existing channels and initialize the new channel with a standard weight initializer like Xavier, Dirac, etc. or you can also copy the weights from one of the pretrained channels to the new one"
  },
  "source": "meta"
}