create_block¶

create_block(kernels, input_ch, output_ch, *, pre_activation)[source]¶

Helper to create a block of Vanilla Convolution.

This is in pre-activation style.

Parameters:
  • pre_activation (bool) – Whether to apply activation layer before the convolution layer. Should be True for ResNet blocks.

  • kernels (list) – A list of convolution layers. Each item is an integer and denotes the layer kernel size.

  • input_ch (int) – Number of channels in the input images.

  • output_ch (int) – Number of channels in the output images.

Return type:

list