{
  "id": 22070,
  "title": "Exception using VGG16",
  "url": "/competitions/state-farm-distracted-driver-detection/discussion/22070",
  "author_name": "",
  "post_date": "2016-07-06T16:26:39.520Z",
  "votes": null,
  "comment_count": 3,
  "views": 640,
  "content": "<p>I am trying to get started using the VGG16 discussed in other threads, but I am getting this exception: \nException: Layer weight shape (64, 1, 3, 3) not compatible with provided weight shape (64, 3, 3, 3)\nWhere should I look to fix this issue?</p>",
  "messages": [
    {
      "id": "126128",
      "postDate": "07/06/2016 16:26:39",
      "content": "<p>I am trying to get started using the VGG16 discussed in other threads, but I am getting this exception: \nException: Layer weight shape (64, 1, 3, 3) not compatible with provided weight shape (64, 3, 3, 3)\nWhere should I look to fix this issue?</p>",
      "rawMarkdown": "I am trying to get started using the VGG16 discussed in other threads, but I am getting this exception: \r\nException: Layer weight shape (64, 1, 3, 3) not compatible with provided weight shape (64, 3, 3, 3)\r\nWhere should I look to fix this issue?",
      "votes": null
    },
    {
      "id": "126133",
      "postDate": "07/06/2016 16:52:32",
      "content": "<p>This happens since you loaded the data as greyscale images - so the first layer is 64,1,3,3\nWhile vgg net was trained over rgb images for which the first layer shape is 64,3,3,3</p>\n\n<p>Try loading gbr images - that should do...</p>",
      "rawMarkdown": "This happens since you loaded the data as greyscale images - so the first layer is 64,1,3,3\r\nWhile vgg net was trained over rgb images for which the first layer shape is 64,3,3,3\r\n\r\nTry loading gbr images - that should do...",
      "votes": null
    },
    {
      "id": "126139",
      "postDate": "07/06/2016 18:53:15",
      "content": "<p>Thank you Nathaniel, that is what I thought. Are the vgg16 weights trained on grayscale images?</p>",
      "rawMarkdown": "Thank you Nathaniel, that is what I thought. Are the vgg16 weights trained on grayscale images?",
      "votes": null
    },
    {
      "id": "126141",
      "postDate": "07/06/2016 19:06:52",
      "content": "<p>As far as I know there is no vgg weights file for greyscale images.</p>\n\n<p>Memory is surely an issue in this competition but i guess its a part of the daily challanges that are not going to fade. resolution of images will continue to rise and we have to learn to handel it with available resources.</p>\n\n<p>What has worked for me was to load and train the net over the first 200 images of each category but i guess that is the reason i could not get to the preformance stated in the forums for vgg model.</p>\n\n<p>I'm currently using gtx 760 on an i5 cpu with 16 gb ram but plan on upgrading soon.</p>\n\n<p>Good luck!</p>\n\n<p>Nati</p>",
      "rawMarkdown": "As far as I know there is no vgg weights file for greyscale images.\r\n\r\nMemory is surely an issue in this competition but i guess its a part of the daily challanges that are not going to fade. resolution of images will continue to rise and we have to learn to handel it with available resources.\r\n\r\nWhat has worked for me was to load and train the net over the first 200 images of each category but i guess that is the reason i could not get to the preformance stated in the forums for vgg model.\r\n\r\nI'm currently using gtx 760 on an i5 cpu with 16 gb ram but plan on upgrading soon.\r\n\r\nGood luck!\r\n\r\nNati",
      "votes": null
    }
  ],
  "comments": [
    {
      "id": 126133,
      "author_name": "interesting",
      "author_url": "",
      "post_date": "07/06/2016 16:52:32",
      "content": "<p>This happens since you loaded the data as greyscale images - so the first layer is 64,1,3,3\nWhile vgg net was trained over rgb images for which the first layer shape is 64,3,3,3</p>\n\n<p>Try loading gbr images - that should do...</p>",
      "votes": null,
      "replies": []
    },
    {
      "id": 126139,
      "author_name": "vzocca",
      "author_url": "",
      "post_date": "07/06/2016 18:53:15",
      "content": "<p>Thank you Nathaniel, that is what I thought. Are the vgg16 weights trained on grayscale images?</p>",
      "votes": null,
      "replies": []
    },
    {
      "id": 126141,
      "author_name": "interesting",
      "author_url": "",
      "post_date": "07/06/2016 19:06:52",
      "content": "<p>As far as I know there is no vgg weights file for greyscale images.</p>\n\n<p>Memory is surely an issue in this competition but i guess its a part of the daily challanges that are not going to fade. resolution of images will continue to rise and we have to learn to handel it with available resources.</p>\n\n<p>What has worked for me was to load and train the net over the first 200 images of each category but i guess that is the reason i could not get to the preformance stated in the forums for vgg model.</p>\n\n<p>I'm currently using gtx 760 on an i5 cpu with 16 gb ram but plan on upgrading soon.</p>\n\n<p>Good luck!</p>\n\n<p>Nati</p>",
      "votes": null,
      "replies": []
    }
  ],
  "raw_markdown_by_id": {
    "126128": "I am trying to get started using the VGG16 discussed in other threads, but I am getting this exception: \r\nException: Layer weight shape (64, 1, 3, 3) not compatible with provided weight shape (64, 3, 3, 3)\r\nWhere should I look to fix this issue?",
    "126133": "This happens since you loaded the data as greyscale images - so the first layer is 64,1,3,3\r\nWhile vgg net was trained over rgb images for which the first layer shape is 64,3,3,3\r\n\r\nTry loading gbr images - that should do...",
    "126139": "Thank you Nathaniel, that is what I thought. Are the vgg16 weights trained on grayscale images?",
    "126141": "As far as I know there is no vgg weights file for greyscale images.\r\n\r\nMemory is surely an issue in this competition but i guess its a part of the daily challanges that are not going to fade. resolution of images will continue to rise and we have to learn to handel it with available resources.\r\n\r\nWhat has worked for me was to load and train the net over the first 200 images of each category but i guess that is the reason i could not get to the preformance stated in the forums for vgg model.\r\n\r\nI'm currently using gtx 760 on an i5 cpu with 16 gb ram but plan on upgrading soon.\r\n\r\nGood luck!\r\n\r\nNati"
  },
  "source": "meta"
}