torch_blue.vi.VIConv3d
- class torch_blue.vi.VIConv3d(in_channels: int, out_channels: int, kernel_size: int | Tuple[int, int, int], stride: int | Tuple[int, int, int] = 1, padding: str | int | Tuple[int, int, int] = 0, dilation: int | Tuple[int, int, int] = 1, groups: int = 1, bias: bool = True, padding_mode: str = 'zeros', variational_distribution: Distribution | List[Distribution] = MeanFieldNormal(), prior: Distribution | List[Distribution] = MeanFieldNormal(), rescale_prior: bool = False, kaiming_initialization: bool = True, prior_initialization: bool = False, return_log_probs: bool = True, device: torch.device | None = None, dtype: torch.dtype | None = None)
Bases:
_VIConvNdApplies a 3D convolution over an input signal composed of several input planes.
Equivalent of
Conv3dwith variational inference. See its documentation for usage.In addition to those arguments, this class accepts
VIkwargs.This module’s random variables are
(“weight”, “bias”) if bias == True
(“weight”, ) if bias == False
- Parameters:
- forward(input_: torch.Tensor) torch.Tensor
Forward computation.
Applies a 3D convolution to a tensor of shape [N, C_in, D_in, H_in, W_in]. Where N is the batch size, C are channels, and [D, H, W] are depth, height, and width of the input.
- Parameters:
input (Tensor) – Input tensor of shape [N, C_in, D_in, H_in, W_in].
- Returns:
output – Output tensor of shape [N, C_out, D_out, H_out, W_out]. Auto-sampling will add a sample dimension at the start for the overall output.
- Return type:
Tensor