tensorplay.nn.modules
The tensorplay.nn module provides the building blocks for creating neural networks. It is designed to be highly modular and compatible with the PyTorch nn API.
Core Concepts
Module: The base class for all neural network layers. Your models should also inherit from this class.Parameter: A special kind of Tensor that is automatically registered as a module parameter when assigned as an attribute.Functional: Stateless versions of the layers, found intensorplay.nn.functional.
Module Categories
For specific layers, see:
- Modules (Base): Base classes like
ModuleandParameter. - Linear Layers: Fully connected layers.
- Convolution Layers: 1D, 2D, and 3D convolution layers.
- Pooling Layers: Max and Average pooling.
- Activation Functions: ReLU, Sigmoid, Tanh, etc.
- Normalization Layers: BatchNorm, LayerNorm, InstanceNorm.
- Loss Functions: MSE, CrossEntropy, NLLLoss.
- Dropout Layers: Dropout and AlphaDropout.
- Container:
Sequential,ModuleList,ModuleDict.
