I’m new to PyTorch. Suppose you want to set layer weights to specific values. Is it better to set mynet.layer.weight[I][j] or set mynet.layer.weight.data[I][j] or does it matter?
For example, mynet.layer.weight[0][0] = 9.9999 and mynet.layer.weight.data[0][0] = 9.9999 both seem to have the same effect. The weight is a Parameter object and weight.data is a Tensor object but I don’t know what the implications are.
This is just investigation on my part. Thanks to some previous feedback from user ‘ptrblck’ I understand the Torch.nn.init functions for practical use.