examples icon indicating copy to clipboard operation
examples copied to clipboard

Superrosulution weight initialisation is wrong

Open wernergithub opened this issue 9 years ago • 2 comments

Hello, I was looking into the superresolution example and printed out the weights of the second convolution layer. It turned out these were 'kinda weird' (similar to picture at http://werner.yellowcouch.org/log/orthogonal-weight-initialisation-in-pytorch-seems-kinda-weird/). So I looked into them and found that the orthogonal weight initialization that was used would not initialize a large section of the weights of a 4 dimensional matrix. Yes, I know that the documentation stated that 'dimensions beyond 2' are flattened. Does not mean though that the values of a large portion of the matrix should be empty.

If the weight initialisation is set to xavier_uniform (as is done for most convolutional networks), then you get much much better results.

wernergithub avatar Nov 19 '17 09:11 wernergithub

cc. @alykhantejani who wrote the example

fmassa avatar Nov 19 '17 12:11 fmassa

Orthogonal weight initialisation and hence this example should be fixed by https://github.com/pytorch/pytorch/pull/2734.

Kaixhin avatar Feb 02 '18 03:02 Kaixhin