Summary
PyTorch provides a higher level API to build and train deep networks using the torch.nn module, which can be used to wrap parameters, functions, and layers such as convolution and affine layers with nn.Conv2d.
1
It also provides functions for extracting sliding local blocks from a batched input tensor, applying max pooling, and calculating partial inverses.
2
Finally, it provides modules for generating a tensor with a reflection of the input boundary.
2
According to
See more results on Neeva
Summaries from the best pages on the web
Docs > torch.nn > Module You can assign the submodules as regular attributes: import torch.nn as nn import torch.nn.functional as F class Model ( nn . Module ...
Module — PyTorch 1.13 documentation
pytorch.org
Summary
torch.nn is a library for PyTorch 1.13 that provides a variety of modules for neural network computation, such as convolution, max pooling, and pinning. It also provides functions for extracting sliding local blocks from a batched input tensor, applying max pooling, and calculating partial inverses. Finally, it provides modules for generating a tensor with a reflection of the input boundary.
torch.nn — PyTorch 1.13 documentation
pytorch.org
Summary
The nn modules in PyTorch provides us a higher level API to build and train deep network.
In PyTorch, we use torch.nn to build layers. For example, in __iniit__ , we configure different trainable layers including convolution and affine layers with nn.Conv2d
“PyTorch - Neural networks with nn modules”
jhui.github.io
These examples show how elaborate neural networks can be formed through module composition and conveniently manipulated. To allow for quick and easy ...
Modules — PyTorch 1.13 documentation
pytorch.org