I’m trying to initialize weight of a conv layer like below,
class some_model(nn.Module):
def __init__(self):

    super(some_model, self).__init__()

    self.blur=nn.Conv2d(1,1,kernel_size=3,padding=1,bias=False)

    self.blur.weight[0][0][0][0]=0.0751
    self.blur.weight[0][0][0][1]=0.1238
    ...
def forward(self, x):
    xblur=self.blur(x)
    return xblur

But I got the following error message:
ValueError: can’t optimize a non-leaf Tensor
What is the correct way to initialize weight mannually?