Hi there.
Is there any specification about torch.xxx(ops), such as torch.max_pool2d,torch.conv2d? I cannot found it in https://pytorch.org/docs
.
How do they differ from their torch.nn.functional.xxx
counterpart?
Hi there.
Is there any specification about torch.xxx(ops), such as torch.max_pool2d,torch.conv2d? I cannot found it in https://pytorch.org/docs
.
How do they differ from their torch.nn.functional.xxx
counterpart?
You can see the different in nn.Linear()
and nn.functional.linear()
. In general speaking, one is class and another is base function interface. I remember that if you use nn.functional.linear()
, you should set bias manually.
torch.conv2d is the exact same as torch.nn.functional.conv2d. You can check where they are defined in torch/nn/functional.py.