torch.nn.conv2d does not give the same result as torch.nn.functional.conv2d
This is my code:

l1 = nn.Conv2d(3, 2, kernel_size=3, stride=2).double() #Layer
l1wt = l1.weight.data #filter
inputs = np.random.rand(3, 3, 5, 5) #input
it = torch.from_numpy(inputs) #input tensor
output1 = l1(it) #output
output2 = torch.nn.functional.conv2d(it, l1wt, stride=2) #output
print(output1)
print(output2)


I would expect to get the same result for output1 and output2, but they are not.
Am I doing something wrong are do nn and nn.functional work different?

I think you forgot the bias. 

inp = torch.rand(3,3,5,5)
a = nn.Conv2d(3,2,3,stride=2)
a(inp)
nn.functional.conv2d(inp, a.weight.data, bias=a.bias.data)


Looks the same to me
