Solved by albanD in post #2 
              
              
                Since you use the tensor inside your bias with self.bias.data, this will not work with the autograd system. 
If you are using the master branch with automatic broadcasting, your can simply do: 
def forward(self, x):
    x = self.conv1(x)
    out = x + self.bias
    return out

If not, you will need …