dataeval.utils.models.Encoder

class dataeval.utils.models.Encoder(input_shape, encoding_dim)

A simple encoder to be used in an autoencoder model.

It consists of a CNN followed by a fully connected layer.

Parameters:
input_shape : tuple[int, int, int]

Shape of the input data in CHW format.

encoding_dim : int

The size of the 1D array that emerges from the fully connected layer.

forward(x)

Perform a forward pass through the encoder.

Parameters:
x : torch.Tensor

Input tensor

Returns:

The encoded representation of the input tensor.

Return type:

torch.Tensor