qbm4eo.decoder module
This file is a part of qbm4eo.rst project.
https://github.com/FeralQubits/qbm4eo
It has been modified as a part of the EuroHPC PL project funded at the Smart Growth Operational Programme 2014-2020, Measure 4.2 under the grant agreement no. POIR.04.02.00-00-D014/20-00.
- class qbm4eo.decoder.LBAEDecoder(input_size: Sequence[int], output_size: Sequence[int], latent_space_size: int, num_layers: int, *args: Dict[str, Any], negative_slope: float = 0.02, bias: bool = False, **kwargs: Dict[str, Any])[source]
Bases:
ModuleThe decoder part of the LBAE model.
A default constructor for the LBAEDecoder class.
- Parameters:
input_size – The size of the input tensor. This should be a tuple of the form (channels, height, width). The height and width should be divisible by 2**num_layers.
output_size – The size of the output tensor.
latent_space_size – The size of the latent space. This is the size of the input to the linear layer.
num_layers – The number of layers in the decoder. This is the number of ResBlockDeConv blocks.
negative_slope – The negative slope of the LeakyReLU activation function.
bias – Whether to use a bias term in the convolutional layer.
args – Additional arguments to pass to the super class.
kwargs – Additional keyword arguments to pass to the super class.
- class qbm4eo.decoder.ResBlockDeConv(channels: int, *args: Dict[str, Any], in_channels: int | None = None, negative_slope: float = 0.02, bias: bool = False, **kwargs: Dict[str, Any])[source]
Bases:
ModuleA residual block for the decoder part of the LBAE model.
A default constructor for the ResBlockDeConv class.
- Parameters:
channels – The number of channels in the input and output.
in_channels – The number of channels in the input. If None, defaults to the number of channels in the output. Defaults to None.
negative_slope – The negative slope of the LeakyReLU activation function.
bias – Whether to use a bias term in the convolutional layer.
args – Additional arguments to pass to the super class.
kwargs – Additional keyword arguments to pass to the super class.
- class qbm4eo.decoder.ResBlockDeConvPart(channels: int, *args: Dict[str, Any], negative_slope: float = 0.02, bias: bool = False, **kwargs: Dict[str, Any])[source]
Bases:
ModuleA single part of the ResBlockDeConv class.
A default constructor for the ResBlockDeConvPart class.
- Parameters:
channels – The number of channels in the input and output.
negative_slope – The negative slope of the LeakyReLU activation function.
bias – Whether to use a bias term in the convolutional layer.
args – Additional arguments to pass to the super class.
kwargs – Additional keyword arguments to pass to the super class.