NVIDIA Morpheus (24.06)

morpheus.models.dfencoder.ae_module.AEModule

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

Bases: torch.nn.Module

Auto Encoder Pytorch Module.

Methods

__call__(*args, **kwargs) Call self as a function.
build(numeric_fts, binary_fts, categorical_fts) Constructs the autoencoder model.
decode(x[, layers]) Decodes the input using the decoder layers and computes the outputs.
encode(x[, layers]) Encodes the input using the encoder layers.
forward(input) Passes the input through the model and returns the outputs.
build(numeric_fts, binary_fts, categorical_fts)[source]

Constructs the autoencoder model.

Parameters
numeric_fts

The names of the numeric features.

binary_fts

The names of the binary features.

categorical_fts

The dictionary mapping categorical feature names to dictionaries containing the categories of the feature.

decode(x, layers=None)[source]

Decodes the input using the decoder layers and computes the outputs.

Parameters
x

The encoded input tensor to decode.

layers

The number of layers to use for decoding. Defaults to None, will use all decoder layers.

Returns
tuple of Union[torch.Tensor, List[torch.Tensor]]

A tuple containing the numeric (Tensor), binary (Tensor), and categorical outputs (List[torch.Tensor]) of the model.

encode(x, layers=None)[source]

Encodes the input using the encoder layers.

Parameters
x

The input tensor to encode.

layers

The number of layers to use for encoding. Defaults to None, will use all encoder layers.

Returns
torch.Tensor

The encoded output tensor.

forward(input)[source]

Passes the input through the model and returns the outputs.

Parameters
input

The input tensor.

Returns
tuple of Union[torch.Tensor, List[torch.Tensor]]

A tuple containing the numeric (Tensor), binary (Tensor), and categorical outputs (List[torch.Tensor]) of the model.

Previous morpheus.models.dfencoder.ae_module
Next morpheus.models.dfencoder.ae_module.CompleteLayer
© Copyright 2024, NVIDIA. Last updated on Jul 8, 2024.