Thankyou very much. So if I modify the code as follows,

class MyModel(nn.Module):
    def __init__(self):
        super(MyModel, self).__init__()
        conv = nn.Conv2d(1, 6, 3)
        self.weight = conv.weight
        self.bias = conv.bias

    def modify_conv_weights(self, weights, bias):
        # DO SOME OPERATIONS
        return weights, bias
        
    def forward(self, x):
        x = F.conv2d(x, self.weight, self.bias)
       self.weight, self.bias = modify_conv_weights(self.weight, self.bias)
        return x

x = torch.randn(1, 1, 4, 4)
model = MyModel()
out = model(x)

Then this way I will be able to modify the the weights of the conv layer or in each forward pass of the model the new weights will have no correspondence to previous value?
Yours sincerely