gromo.tools.compute_output_shape_conv#

gromo.tools.compute_output_shape_conv(input_shape: tuple[int, int], conv: Conv2d) tuple[int, int][source]#

Compute the output shape of a convolutional layer

Parameters:
  • input_shape (tuple) – shape of the input tensor (H, W)

  • conv (torch.nn.Conv2d) – convolutional layer

Returns:

output shape of the convolutional layer

Return type:

tuple[int, int]