Separable Convolutions

class ezflow.decoder.separable_conv.Butterfly4D(f_dim_1, f_dim_2, norm=True, full=True, groups=1)[source]

Applies a FeatureProjection4D followed by five SeperableConv4d convolutions to the input feature map.

Parameters
  • f_dim_1 (int) – Number of input channels

  • f_dim_2 (int) – Number of output channels

  • stride (tuple, default : (1, 1, 1)) – Stride of the convolution

  • norm (bool, default : True) – If True, applies Batch Normalization

  • full (bool, default : True) – If True, applies SeparableConv4D otherwise FeatureProjection4D

  • groups (int, default : 1) – Number of groups for 3D convolution, in_channels and out_channels must both be divisible by groups

forward(x)[source]

Defines the computation performed at every call.

Should be overridden by all subclasses.

Note

Although the recipe for forward pass needs to be defined within this function, one should call the Module instance afterwards instead of this since the former takes care of running the registered hooks while the latter silently ignores them.

class ezflow.decoder.separable_conv.FeatureProjection4D(in_channels, out_channels, stride, norm=True, groups=1)[source]

Applies a 3D convolution to the input feature map

Parameters
  • in_channels (int) – Number of input channels

  • out_channels (int) – Number of output channels

  • stride (int) – Stride of the convolution

  • norm (bool, default : True) – If True, applies Batch Norm 3D

  • groups (int, default : 1) – Number of groupds for 3D convolution, in_channels and out_channels must be divisible by groups

forward(x)[source]

Defines the computation performed at every call.

Should be overridden by all subclasses.

Note

Although the recipe for forward pass needs to be defined within this function, one should call the Module instance afterwards instead of this since the former takes care of running the registered hooks while the latter silently ignores them.

class ezflow.decoder.separable_conv.SeparableConv4D(in_channels, out_channels, stride=(1, 1, 1), norm=True, k_size=3, full=True, groups=1)[source]

Applies two 3D convolution followed by an optional 2D convolution to the input feature map.

Parameters
  • in_channels (int) – Number of input channels

  • out_channels (int) – Number of output channels

  • stride (tuple, default : (1, 1, 1)) – Stride of the convolution

  • norm (bool, default : True) – If True, applies Batch Normalization

  • k_size (int, default : 3) – Size of the kernel

  • full (bool, default : True) – If True, applies a stride of (1, 1, 1)

  • groups (int, default : 1) – Number of groups for 3D convolution, in_channels and out_channels must both be divisible by groups

forward(x)[source]

Defines the computation performed at every call.

Should be overridden by all subclasses.

Note

Although the recipe for forward pass needs to be defined within this function, one should call the Module instance afterwards instead of this since the former takes care of running the registered hooks while the latter silently ignores them.

class ezflow.decoder.separable_conv.SeparableConv4DBlock(in_channels, out_channels, stride=(1, 1, 1), norm=True, full=True, groups=1)[source]

Applies separate SeperableConv4d convolutions to the input feature map.

Parameters
  • in_channels (int) – Number of input channels

  • out_channels (int) – Number of output channels

  • stride (tuple, default : (1, 1, 1)) – Stride of the convolution

  • norm (bool, default : True) – If True, applies Batch Normalization

  • k_size (int, default : 3) – Size of the kernel

  • full (bool, default : True) – If True, applies SeparableConv4D otherwise FeatureProjection4D

  • groups (int, default : 1) – Number of groups for 3D convolution, in_channels and out_channels must both be divisible by groups

forward(x)[source]

Defines the computation performed at every call.

Should be overridden by all subclasses.

Note

Although the recipe for forward pass needs to be defined within this function, one should call the Module instance afterwards instead of this since the former takes care of running the registered hooks while the latter silently ignores them.