Pytorch: Is it able to make a convolution module without bias have bias again?
After instantiating a 2D convolution with conv = nn.Conv2d(8, 8, 3, bias=False), whose member bias should be None, is it able to give conv a legal bias again (whether with random initialization or determined values)?
I observed that bias in other default convolution modules is of the type Parameter, so I suspect there are extra procedures beyond simply conv.bias = torch.tensor(...) to make the new bias legal for conv.

Yes, it is possible to set the bias of the conv layer after instantiating. You can use the nn.Parameter class to create bias parameter and assign to conv object's bias attribute.
To show this I have created a simple Conv2d layer and assigned zero to the weights and ones to bias.

conv = nn.Conv2d(1, 1, 1, bias=False)

conv.weight.data = torch.zeros_like(conv.weight)
conv.bias = nn.Parameter(torch.ones((1,)))

inputs = torch.randn(1, 1, 1, 1)

print(conv(inputs))
# tensor([[[[1.]]]], grad_fn=&lt;ThnnConv2DBackward&gt;)


