trw.layers.convs_transpose
¶
Module Contents¶
Classes¶
Helper class to create sequence of transposed convolution |
- class trw.layers.convs_transpose.ConvsTransposeBase(dimensionality: int, input_channels: int, channels: Sequence[int], *, convolution_kernels: trw.basic_typing.ConvKernels = 5, strides: trw.basic_typing.ConvStrides = 2, paddings: Optional[trw.basic_typing.Paddings] = None, activation: Any = nn.ReLU, activation_kwargs: Dict = {}, dropout_probability: Optional[float] = None, norm_type: Optional[trw.layers.convs.NormType] = None, norm_kwargs: Dict = {}, last_layer_is_output: bool = False, squash_function: Optional[Callable[[torch.Tensor], torch.Tensor]] = None, deconv_block_fn: trw.layers.blocks.ConvTransposeBlockType = BlockDeconvNormActivation, config: trw.layers.convs.LayerConfig = default_layer_config(dimensionality=None), target_shape: Optional[Sequence[int]] = None)¶
Bases:
torch.nn.Module
,trw.layers.convs.ModuleWithIntermediate
Helper class to create sequence of transposed convolution
This can be used to map an embedding back to image space.
- forward_with_intermediate(self, x)¶
- forward_simple(self, x)¶
- forward(self, x)¶