In the code snippet below, would there be any difference in backpropagation between the mean() method and AvgPooling2d() functional? I see only the tensor size is changing
x = torch.autograd.Variable(torch.rand(1,1,2,2));
avgpool = nn.AvgPool2d(2,2);
------- option 1 --------
x = x.mean();
------ option 2 ----------
x  = avgpool(x);
other codes and finally loss
…
loss = ***
loss.backward();