{
  "id": 53984,
  "title": "Problems training a multi output Unet",
  "url": "/competitions/data-science-bowl-2018/discussion/53984",
  "author_name": "",
  "post_date": "2018-04-07T23:21:17.282498900Z",
  "votes": 1,
  "comment_count": 1,
  "views": 0,
  "content": "<p>I trained a multi output Unet in Pytorch for 100 epochs but when I checked some of the outputs of the network, the outputs for the mask, edges, and centers were the same. </p>\n\n<p>My data loader returns three separate images (mask, edges, and centers) as the ground truth labels for each image that is inputted into the model so I know that the problem isn't in the data that is given to the model.</p>\n\n<p>Since the problem probably isn't in the data loader, I think the problem might be in the model's architecture or how the losses for the three outputs are handled.</p>\n\n<p>Has anyone implemented a multi output Unet and have they gotten this same problem?</p>\n\n<p><a href=\"https://gist.github.com/bkahn-github/f5b0000f376c909ecf838ad547ede460\">Link</a> to the gist with the model's architecture and the training loop.</p>",
  "messages": [
    {
      "id": "310550",
      "postDate": "04/07/2018 23:21:17",
      "content": "<p>I trained a multi output Unet in Pytorch for 100 epochs but when I checked some of the outputs of the network, the outputs for the mask, edges, and centers were the same. </p>\n\n<p>My data loader returns three separate images (mask, edges, and centers) as the ground truth labels for each image that is inputted into the model so I know that the problem isn't in the data that is given to the model.</p>\n\n<p>Since the problem probably isn't in the data loader, I think the problem might be in the model's architecture or how the losses for the three outputs are handled.</p>\n\n<p>Has anyone implemented a multi output Unet and have they gotten this same problem?</p>\n\n<p><a href=\"https://gist.github.com/bkahn-github/f5b0000f376c909ecf838ad547ede460\">Link</a> to the gist with the model's architecture and the training loop.</p>",
      "rawMarkdown": "I trained a multi output Unet in Pytorch for 100 epochs but when I checked some of the outputs of the network, the outputs for the mask, edges, and centers were the same. \n\nMy data loader returns three separate images (mask, edges, and centers) as the ground truth labels for each image that is inputted into the model so I know that the problem isn't in the data that is given to the model.\n\nSince the problem probably isn't in the data loader, I think the problem might be in the model's architecture or how the losses for the three outputs are handled.\n\n Has anyone implemented a multi output Unet and have they gotten this same problem?\n\n [Link][1] to the gist with the model's architecture and the training loop.\n\n[1]: https://gist.github.com/bkahn-github/f5b0000f376c909ecf838ad547ede460",
      "votes": null
    },
    {
      "id": "311119",
      "postDate": "04/09/2018 12:43:54",
      "content": "<p>I never used pytorch but I can see that your output is three times the same thing:\n mask_out     = self.out_conv(x10)\n contour_out = self.out_conv(x10)\n center_out   = self.out_conv(x10)</p>\n\n<p>So it is normal that the three outputs are the same...</p>",
      "rawMarkdown": "I never used pytorch but I can see that your output is three times the same thing:\n mask_out     = self.out_conv(x10)\n contour_out = self.out_conv(x10)\n center_out   = self.out_conv(x10)\n\nSo it is normal that the three outputs are the same...",
      "votes": null
    }
  ],
  "comments": [
    {
      "id": 311119,
      "author_name": "jeandebleau",
      "author_url": "",
      "post_date": "04/09/2018 12:43:54",
      "content": "<p>I never used pytorch but I can see that your output is three times the same thing:\n mask_out     = self.out_conv(x10)\n contour_out = self.out_conv(x10)\n center_out   = self.out_conv(x10)</p>\n\n<p>So it is normal that the three outputs are the same...</p>",
      "votes": null,
      "replies": []
    }
  ],
  "raw_markdown_by_id": {
    "310550": "I trained a multi output Unet in Pytorch for 100 epochs but when I checked some of the outputs of the network, the outputs for the mask, edges, and centers were the same. \n\nMy data loader returns three separate images (mask, edges, and centers) as the ground truth labels for each image that is inputted into the model so I know that the problem isn't in the data that is given to the model.\n\nSince the problem probably isn't in the data loader, I think the problem might be in the model's architecture or how the losses for the three outputs are handled.\n\n Has anyone implemented a multi output Unet and have they gotten this same problem?\n\n [Link][1] to the gist with the model's architecture and the training loop.\n\n[1]: https://gist.github.com/bkahn-github/f5b0000f376c909ecf838ad547ede460",
    "311119": "I never used pytorch but I can see that your output is three times the same thing:\n mask_out     = self.out_conv(x10)\n contour_out = self.out_conv(x10)\n center_out   = self.out_conv(x10)\n\nSo it is normal that the three outputs are the same..."
  },
  "source": "meta"
}