chainer.utils.get_conv_outsize

chainer.utils.get_conv_outsize(size, k, s, p, cover_all=False, d=1)[source]

Calculates output size of convolution.

This function takes the size of input feature map, kernel, stride, and pooling of one particular dimension, then calculates the output feature map size of that dimension.

Parameters
  • size (int) – The size of input feature map. It usually is the length of a side of feature map.

  • k (int) – The size of convolution kernel.

  • s (int) – The size of stride.

  • p (int) – The size of padding.

  • cover_all (bool) – Use cover_all option or not.

  • d (int) – The size of dilation.

Returns

The expected output size of the convolution operation.

Return type

int