NVIDIA Morpheus (24.10.01)
(Latest Version)

morpheus.models.dfencoder.ae_module.CompleteLayer

class CompleteLayer(*args, **kwargs)[source]

Bases: torch.nn.Module

Impliments a layer with linear transformation and optional activation and dropout.

Methods

__call__(*args, **kwargs) Call self as a function.
<a href="#morpheus.models.dfencoder.ae_module.CompleteLayer.forward">forward</a>(x) Performs a forward pass through the CompleteLayer object.
<a href="#morpheus.models.dfencoder.ae_module.CompleteLayer.interpret_activation">interpret_activation</a>([act]) Interprets the name of the activation function and returns the appropriate PyTorch function.
forward(x)[source]

Performs a forward pass through the CompleteLayer object.

Parameters
xtensor

The input tensor to the CompleteLayer object.

Returns
torch.Tensor

The output tensor of the CompleteLayer object after processing the input through all layers.

interpret_activation(act=None)[source]

Interprets the name of the activation function and returns the appropriate PyTorch function.

Parameters
actstr, optional

The name of the activation function to interpret. Defaults to None if no activation function is desired.

Returns
PyTorch function

The PyTorch activation function that corresponds to the given name.

Raises
Exception

If the activation function name is not recognized.

Previous morpheus.models.dfencoder.ae_module.AEModule
Next morpheus.models.dfencoder.autoencoder
© Copyright 2024, NVIDIA. Last updated on Dec 3, 2024.