net
sorix.nn.net ¶
Module ¶
Base class for all neural network modules.
Your models should also subclass this class.
Source code in sorix/nn/net.py
forward ¶
Defines the computation performed at every call. Should be overridden by all subclasses.
parameters ¶
Returns an iterator over module parameters (tensors that require gradients).
Source code in sorix/nn/net.py
to ¶
Moves all model parameters and buffers to the specified device.
Parameters:
-
device(str) –'cpu' or 'cuda'.
Source code in sorix/nn/net.py
train ¶
Sets the module in training mode.
Source code in sorix/nn/net.py
eval ¶
Sets the module in evaluation mode.
Source code in sorix/nn/net.py
state_dict ¶
Returns a dictionary containing the whole state of the module (parameters and buffers).
Source code in sorix/nn/net.py
extra_repr ¶
load_state_dict ¶
Copies parameters and buffers from state_dict into this module and its descendants.
Source code in sorix/nn/net.py
Sequential ¶
Bases: Module
A sequential container. Modules will be added to it in the order they are passed in the constructor.
Examples: