Thanks for the code snippet.
The simple model is running fine without the modification of the conv1.weight and doesn’t yield any errors.
When you are running the conv1.weight.data assignment, you should get an error as:
TypeError: cannot assign 'torch.FloatTensor' as parameter 'weight' (torch.nn.Parameter or None expected)

After fixing it, you would run in another error, since the weight shapes are not matching that of an nn.Conv2d layer, so you would need to unsqueeze two dimensions.
Also, you shouldn’t use the .data attribute, as it might cause issues.
Here is the fixed code, which doesn’t raise the initial error, so I guess some parts might still be missing in order to reproduce this issue:
conv1 = nn.Conv2d(1, 1, kernel_size=2)
with torch.no_grad():
    conv1.weight = nn.Parameter(torch.tensor([[[[-0.8423,  0.3778],[-3.1070, -2.6518]]]]))
  

class prune_net(nn.Module):
    def __init__(self):
        super(prune_net, self).__init__()
        self.conv1 = conv1
        self.pool = nn.MaxPool2d(2, 2)

    def forward(self, x):
        x = self.pool(F.relu(self.conv1(x)))
        return x

model = prune_net()
x = torch.randn(1, 1, 24, 24)
out = model(x)
print(out.shape)
> torch.Size([1, 1, 11, 11])