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.
forward(x) Performs a forward pass through the CompleteLayer object.
interpret_activation([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 2023, NVIDIA. Last updated on Feb 2, 2024.