Readonly
biasReadonly
inReadonly
outReadonly
weightPrivate
immediateAdds a child module of the current module.
The module can be accessed as a property using the given name.
name of the child module
child module to be added
Loads the state of the module and its descendants from the given state dictionary.
The state dictionary containing the state of the module to load.
Returns this module and its descendants' along with their prefixed names.
Optional
memo: Set<Module>is a set of modules used to avoid double counting.
is prependended to the names of the modules.
is a boolean indicating whether to remove duplicate modules.
a generator of [prefixed name, module] pairs.
Gets this module and its descendants' (if recurse = true
) parameters along with their prefixed names.
is prependended to the names of the parameters
whether to include submodule parameters
whether to remove duplicate parameters
a generator of [prefixed name, parameter] pairs
Private
resetReturns the state dictionary of the module and its descendants.
Optional
destination: StateDictAn optional state dictionary to update with the module's state.
A string to prepend to the names of the state entries (default is an empty string).
A boolean flag, if true keeps the tensors attached to autograd (default is true).
The updated state dictionary containing the module's state.
Zeros out the gradients of all parameters. That can be accomplished either by
setting the grad
property to null
(setToNull=true
) or
by filling the gradient tensor with zeros (setToNull=false
).
whether to set gradients to null
(true
) or to zero tensors (false
).
this module
Generated using TypeDoc
Applies a linear transformation to the incoming data:
y = xA^T + b