In inpainting.ipynb, I don't think the following lines actually change the parameters:
for n in [x for x in net.parameters() if len(x.size()) == 4]:
n = n + n.detach().clone().normal_() * n.std() / 50
This is the output of a similar test I've run:
>>> c = nn.Conv2d(1, 1, 1)
>>> list(c.parameters())
[Parameter containing:
tensor([[[[-0.4280]]]], requires_grad=True), Parameter containing:
tensor([0.7987], requires_grad=True)]
>>> for n in [x for x in c.parameters() if len(x.size()) == 4]:
... n = n + 100
...
>>> list(c.parameters())
[Parameter containing:
tensor([[[[-0.4280]]]], requires_grad=True), Parameter containing:
tensor([0.7987], requires_grad=True)]
In
inpainting.ipynb
, I don't think the following lines actually change the parameters:This is the output of a similar test I've run: