mr2.nn.SeparableResBlock
- class mr2.nn.SeparableResBlock[source]
-
Residual block with separable convolutions.
- __init__(dim_groups: Sequence[Sequence[int]], n_channels_in: int, n_channels_out: int, cond_dim: int) None[source]
Initialize the SeparableResBlock.
Applies convolutions as separable convolutions with SilU activation and group normalization. For example, if
dim_groups = ((-1,-2), (-3))then one 2D convolution is applied to the last two dimensions, and one 1D convolution is applied to the last dimension. The order within the block is Norm->Activation->Conv. The whole sequence for all dimension groups is performed twice, with optional FiLM conditioning in between. So for twodim_groups, a total of 4 convolutions are applied.- Parameters: