scalation.modeling.autograd.BaseModule
The BaseModule is a base class for all neural network modules (layers, blocks, models). Provides support for:
- Parameter registration
- Automatic submodule detection
- Gradient management (zeroing)
- Training/evaluation mode switching Modules are structured hierarchically: a module can contain submodules.
Value parameters
-
localParameters
-
the parameters (Variables) directly belonging to this module
Attributes
-
Graph
-
-
Supertypes
-
class Object
trait Matchable
class Any
-
Known subtypes
-
Members list
Set the module to evaluation mode (and all submodules recursively).
Set the module to evaluation mode (and all submodules recursively).
Attributes
Return the gradients of all parameters.
Return the gradients of all parameters.
Attributes
Return all trainable parameters, including those from submodules.
Return all trainable parameters, including those from submodules.
Attributes
Replace the current parameters with new ones. Useful for weight updates, loading saved models, etc.
Replace the current parameters with new ones. Useful for weight updates, loading saved models, etc.
Value parameters
-
newParams
-
The new parameter list to assign
Attributes
Set the module to training mode (and all submodules recursively).
Set the module to training mode (and all submodules recursively).
Attributes
Zero out all gradients (in-place).
Zero out all gradients (in-place).
Attributes
Flag to control training or evaluation behavior.
Flag to control training or evaluation behavior.
Attributes
Automatically detect submodules (other BaseModules) within this module.
Automatically detect submodules (other BaseModules) within this module.
Attributes