aitorzip / PyTorch-SRGAN

A modern PyTorch implementation of SRGAN
https://arxiv.org/abs/1609.04802
GNU General Public License v3.0
361 stars 92 forks source link

the initialization of network weights #7

Closed weizequan closed 6 years ago

weizequan commented 6 years ago

Hi, i don't find the code about the initialization of network weights from all files, like nn.init.normal(w). So, which strategy for initialization do you use?

aitorzip commented 6 years ago

Hi @qigreen,

I use the Pytorch's default, it is uniform between -stdev and stdev where stdev is 1/sqrt(n_weights).

You can check it out here: https://github.com/pytorch/pytorch/blob/master/torch/nn/modules/conv.py