{
  "id": 6717,
  "title": "Visualization contest?",
  "url": "/competitions/galaxy-zoo-the-galaxy-challenge/discussion/6717",
  "author_name": "",
  "post_date": "2013-12-30T22:55:56.030Z",
  "votes": null,
  "comment_count": 8,
  "views": 2965,
  "content": "<p>With all the deep nets on the leaderboard, I suspect there could be some pretty cool viz to come out of this. Will there be a viz competition?</p>\n<p>&nbsp;</p>\n<p>I'm a complete noob to deep learning, but I'm learning quickly. I thought the denoising autoencoder weights dumped as images were pretty interesting:</p>\n<p>&nbsp;</p>\n<p>&nbsp;</p>",
  "messages": [
    {
      "id": "36836",
      "postDate": "12/30/2013 22:55:56",
      "content": "<p>With all the deep nets on the leaderboard, I suspect there could be some pretty cool viz to come out of this. Will there be a viz competition?</p>\n<p>&nbsp;</p>\n<p>I'm a complete noob to deep learning, but I'm learning quickly. I thought the denoising autoencoder weights dumped as images were pretty interesting:</p>\n<p>&nbsp;</p>\n<p>&nbsp;</p>",
      "rawMarkdown": "",
      "votes": null
    },
    {
      "id": "36853",
      "postDate": "12/31/2013 04:48:13",
      "content": "<p>I'd love some good visualizations - we're sorely lacking some right now. I don't know that it will be a formal contest any time soon, but I promise careful consideration and exposure through the Zooniverse if anyone's interested.</p>\n<p>&nbsp;</p>\n<p>I like this first one! - can you explain it further?</p>",
      "rawMarkdown": "",
      "votes": null
    },
    {
      "id": "36854",
      "postDate": "12/31/2013 04:55:34",
      "content": "<p>[quote=Kyle Willett;36853]</p>\n<p><span style=\"line-height: 1.4\">can you explain it further?</span></p>\n<p>[/quote]</p>\n<p>&nbsp;</p>\n<p>Not very well, I'm afraid. I'm still very new to the idea of autoencoders, but I'll do my best to recite what I've learned:</p>\n<p>This is a sample of the weights in the autoencoder. The weights are a matrix trained to transform an image (a galaxy) into a hidden representation (encode), and then another set of weights transform the hidden representation back into the original image (decode). In this case, the decoder weights are just the transpose of the encoder weights (called tied weights). This sounds a lot like a matrix identity function, but you leave out a percentage of the input while still expecting the output, which causes it to learn a general representation of the set of images.</p>\n<p>If anyone else has a way to explain it that makes more sense or corrects any mistakes I made, I'd appreciate it.</p>",
      "rawMarkdown": "",
      "votes": null
    },
    {
      "id": "36885",
      "postDate": "01/01/2014 01:12:17",
      "content": "<p>I'll post some from my model soon. <br><br>Looks decent Zac, but you've got a lot of units that are stuck/not learned. If you're using ReLU try a small positive bias to start with, dropout also helps unstick units usually.<br><br>What did you use for converting the weights back to an rgb image? The current thing I've been using is gray as a baseline for a 0 weight and taking negative r,g,b weights as positive of their opposite. This is what Alex Krizhevsky used in his masters, which is one of the first papers I've read with an explanation of their color visualizations. <br><br>http://www.cs.toronto.edu/~kriz/learning-features-2009-TR.pdf</p>",
      "rawMarkdown": "",
      "votes": null
    },
    {
      "id": "36886",
      "postDate": "01/01/2014 01:23:57",
      "content": "<p>I used this <a href=\"http://deeplearning.net/tutorial/utilities.html#how-to-plot\">handy script</a>&nbsp;to reshape the weights matrix into tiles and then rendered the image with PIL. To extract the three color channels, I wrote this little function:</p>\n<p>&nbsp;</p>\n<p><code>def dump_weights_as_image(da, title):<br>&nbsp; weights = da.weights.get_value().T<br>&nbsp; weights = weights.reshape(500, 424, 424, 3)<br>&nbsp; red = weights[:, :, :, 0]<br>&nbsp; blue = weights[:, :, :, 1]<br>&nbsp; green = weights[:, :, :, 2]<br>&nbsp; tiles = plot.tile_raster_images(<br>&nbsp; &nbsp; X=(red, blue, green, None),<br>&nbsp; &nbsp; img_shape=(424, 424),<br></code><code>&nbsp; &nbsp; tile_shape=(10, 10),<br>&nbsp; &nbsp; tile_spacing=(1, 1))<br></code><code>&nbsp; image = PIL.Image.fromarray(tiles)<br></code><code>&nbsp; image.save(&quot;images/%s.png&quot; % title)</code></p>",
      "rawMarkdown": "",
      "votes": null
    },
    {
      "id": "36889",
      "postDate": "01/01/2014 10:39:14",
      "content": "<p>Roland Memisevic has some code here:<br><br>http://www.iro.umontreal.ca/~memisevr/cifar2013/dispims_color.py</p>",
      "rawMarkdown": "",
      "votes": null
    },
    {
      "id": "36905",
      "postDate": "01/02/2014 05:49:37",
      "content": "<p>Pretty cool, I like the colors. I'm currently working with grayscale pictures only.</p>\n<p>Here is what<span style=\"line-height: 1.4\">&nbsp;my first denoising autoencoder layer learned after 7000 iterations on the images.&nbsp;</span></p>",
      "rawMarkdown": "",
      "votes": null
    },
    {
      "id": "38896",
      "postDate": "02/16/2014 10:14:26",
      "content": "<p>Hi, I have also plotted the mean of all the images (I used centre 224*224*3 patch which I deem will suffice). Even though mean does not mean anything, but by looking at the mean, there is a very clear round shape with some certain colour at the brink. I think I am plotting the right mean, but the image seems a bit too regular and the colour formation is a bit odd. Anyone have similar result or spot anything erroneous here?</p>\n<p><img src=\"https://dl.dropboxusercontent.com/u/16873884/data_mean.png\" alt=\"Image_mean\" width=\"224\" height=\"224\"></p>",
      "rawMarkdown": "",
      "votes": null
    },
    {
      "id": "38929",
      "postDate": "02/16/2014 21:38:26",
      "content": "<p>Apologies for the erroneous picture, in Python pylab.imshow, we need to normalize to (0,1). Attached with the correct (boring) mean:</p>\n<p><img src=\"https://dl.dropboxusercontent.com/u/16873884/data_mean_python_correct.png\" alt=\"correct_mean\" width=\"224\" height=\"169\"></p>",
      "rawMarkdown": "",
      "votes": null
    }
  ],
  "comments": [
    {
      "id": 36853,
      "author_name": "willettk",
      "author_url": "",
      "post_date": "12/31/2013 04:48:13",
      "content": "<p>I'd love some good visualizations - we're sorely lacking some right now. I don't know that it will be a formal contest any time soon, but I promise careful consideration and exposure through the Zooniverse if anyone's interested.</p>\n<p>&nbsp;</p>\n<p>I like this first one! - can you explain it further?</p>",
      "votes": null,
      "replies": []
    },
    {
      "id": 36854,
      "author_name": "zacstewart",
      "author_url": "",
      "post_date": "12/31/2013 04:55:34",
      "content": "<p>[quote=Kyle Willett;36853]</p>\n<p><span style=\"line-height: 1.4\">can you explain it further?</span></p>\n<p>[/quote]</p>\n<p>&nbsp;</p>\n<p>Not very well, I'm afraid. I'm still very new to the idea of autoencoders, but I'll do my best to recite what I've learned:</p>\n<p>This is a sample of the weights in the autoencoder. The weights are a matrix trained to transform an image (a galaxy) into a hidden representation (encode), and then another set of weights transform the hidden representation back into the original image (decode). In this case, the decoder weights are just the transpose of the encoder weights (called tied weights). This sounds a lot like a matrix identity function, but you leave out a percentage of the input while still expecting the output, which causes it to learn a general representation of the set of images.</p>\n<p>If anyone else has a way to explain it that makes more sense or corrects any mistakes I made, I'd appreciate it.</p>",
      "votes": null,
      "replies": []
    },
    {
      "id": 36885,
      "author_name": "alecradford",
      "author_url": "",
      "post_date": "01/01/2014 01:12:17",
      "content": "<p>I'll post some from my model soon. <br><br>Looks decent Zac, but you've got a lot of units that are stuck/not learned. If you're using ReLU try a small positive bias to start with, dropout also helps unstick units usually.<br><br>What did you use for converting the weights back to an rgb image? The current thing I've been using is gray as a baseline for a 0 weight and taking negative r,g,b weights as positive of their opposite. This is what Alex Krizhevsky used in his masters, which is one of the first papers I've read with an explanation of their color visualizations. <br><br>http://www.cs.toronto.edu/~kriz/learning-features-2009-TR.pdf</p>",
      "votes": null,
      "replies": []
    },
    {
      "id": 36886,
      "author_name": "zacstewart",
      "author_url": "",
      "post_date": "01/01/2014 01:23:57",
      "content": "<p>I used this <a href=\"http://deeplearning.net/tutorial/utilities.html#how-to-plot\">handy script</a>&nbsp;to reshape the weights matrix into tiles and then rendered the image with PIL. To extract the three color channels, I wrote this little function:</p>\n<p>&nbsp;</p>\n<p><code>def dump_weights_as_image(da, title):<br>&nbsp; weights = da.weights.get_value().T<br>&nbsp; weights = weights.reshape(500, 424, 424, 3)<br>&nbsp; red = weights[:, :, :, 0]<br>&nbsp; blue = weights[:, :, :, 1]<br>&nbsp; green = weights[:, :, :, 2]<br>&nbsp; tiles = plot.tile_raster_images(<br>&nbsp; &nbsp; X=(red, blue, green, None),<br>&nbsp; &nbsp; img_shape=(424, 424),<br></code><code>&nbsp; &nbsp; tile_shape=(10, 10),<br>&nbsp; &nbsp; tile_spacing=(1, 1))<br></code><code>&nbsp; image = PIL.Image.fromarray(tiles)<br></code><code>&nbsp; image.save(&quot;images/%s.png&quot; % title)</code></p>",
      "votes": null,
      "replies": []
    },
    {
      "id": 36889,
      "author_name": "ryankiros",
      "author_url": "",
      "post_date": "01/01/2014 10:39:14",
      "content": "<p>Roland Memisevic has some code here:<br><br>http://www.iro.umontreal.ca/~memisevr/cifar2013/dispims_color.py</p>",
      "votes": null,
      "replies": []
    },
    {
      "id": 36905,
      "author_name": "ramarlina",
      "author_url": "",
      "post_date": "01/02/2014 05:49:37",
      "content": "<p>Pretty cool, I like the colors. I'm currently working with grayscale pictures only.</p>\n<p>Here is what<span style=\"line-height: 1.4\">&nbsp;my first denoising autoencoder layer learned after 7000 iterations on the images.&nbsp;</span></p>",
      "votes": null,
      "replies": []
    },
    {
      "id": 38896,
      "author_name": "stevenwudi",
      "author_url": "",
      "post_date": "02/16/2014 10:14:26",
      "content": "<p>Hi, I have also plotted the mean of all the images (I used centre 224*224*3 patch which I deem will suffice). Even though mean does not mean anything, but by looking at the mean, there is a very clear round shape with some certain colour at the brink. I think I am plotting the right mean, but the image seems a bit too regular and the colour formation is a bit odd. Anyone have similar result or spot anything erroneous here?</p>\n<p><img src=\"https://dl.dropboxusercontent.com/u/16873884/data_mean.png\" alt=\"Image_mean\" width=\"224\" height=\"224\"></p>",
      "votes": null,
      "replies": []
    },
    {
      "id": 38929,
      "author_name": "stevenwudi",
      "author_url": "",
      "post_date": "02/16/2014 21:38:26",
      "content": "<p>Apologies for the erroneous picture, in Python pylab.imshow, we need to normalize to (0,1). Attached with the correct (boring) mean:</p>\n<p><img src=\"https://dl.dropboxusercontent.com/u/16873884/data_mean_python_correct.png\" alt=\"correct_mean\" width=\"224\" height=\"169\"></p>",
      "votes": null,
      "replies": []
    }
  ],
  "raw_markdown_by_id": {
    "36836": "",
    "36853": "",
    "36854": "",
    "36885": "",
    "36886": "",
    "36889": "",
    "36905": "",
    "38896": "",
    "38929": ""
  },
  "source": "meta"
}