An autoencoder model with a separate encoder and decoder.
- Parameters:
- channels : int, default 3
Number of input channels
-
encode(x)
Encode the input tensor using the encoder.
- Parameters:
- x : torch.Tensor
Input tensor
- Returns:
The encoded representation of the input tensor.
- Return type:
torch.Tensor
-
forward(x)
Perform a forward pass through the encoder and decoder.
- Parameters:
- x : torch.Tensor
Input tensor
- Returns:
The reconstructed output tensor.
- Return type:
torch.Tensor