Activation module
- class nnodely.layers.activation.Relu(*args, **kwargs)[source]
Implement the Rectified-Linear Unit (ReLU) relation function.
See also
Official PyTorch ReLU documentation: torch.nn.ReLU
- Parameters:
obj (Stream) – The relation stream.
Example:
x = Relu(x)
- class nnodely.layers.activation.ELU(*args, **kwargs)[source]
Implement the Exponential-Linear Unit (ELU) relation function.
See also
Official PyTorch ReLU documentation: torch.nn.ELU
- Parameters:
obj (Stream) – The relation stream.
Example:
x = ELU(x)
- class nnodely.layers.activation.Sigmoid(*args, **kwargs)[source]
Implement the Sigmoid relation function. The Sigmoid function is defined as:
See also
Official PyTorch Softmax documentation: Sigmoid function
\[\sigma(x) = \frac{1}{1 + e^{-x}}\]- Parameters:
obj (Stream) – The relation stream.
Example:
x = Sigmoid(x)
- class nnodely.layers.activation.Softmax(*args, **kwargs)[source]
Implement the Softmax relation function.
See also
Official PyTorch Softmax documentation: torch.nn.Softmax
- Parameters:
obj (Stream) – The relation stream.
Example:
x = Softmax(x)
- class nnodely.layers.activation.Identity(*args, **kwargs)[source]
Implement the Identity relation function that simply returns the input vector x.
See also
Official PyTorch Identity documentation: torch.nn.Identity
- Parameters:
obj (Stream) – The relation stream.
Example:
x = Identity(x)