For example, I want to explicitly multiply 2 on the convolution layers’ weight.
I motify the official conv.py.py from :
def forward(self, input): return self._conv_forward(input, self.weight)
def forward(self, input): new_weight = self.weight * torch.ones(self.weight.size())*2 return self._conv_forward(input, new_weight)
I noticed that the type of
torch.Tensor rather than
So I wonder whether it’s OK to do this? And can the backward process works correctly?
Thanks in advance!