class_docstr: Test CNNModule.
class_docstr_tok: ["Test","CNNModule","."]
code: def test_output_with_max_pooling(
      self,
      kernel_sizes,
      hidden_channels,
      strides,
      pool_shape,
      pool_stride,
  ):
      model = CNNModule(
          self.input_spec,
          image_format="NCHW",
          hidden_channels=hidden_channels,
          kernel_sizes=kernel_sizes,
          strides=strides,
          max_pool=True,
          pool_shape=[(pool_shape, pool_shape)],
          pool_stride=[(pool_stride, pool_stride)],
      )
      x = model(self.input)
      fc_w = torch.zeros((x.shape[1], 10))
      fc_b = torch.zeros(10)
      result = x.mm(fc_w) + fc_b
      assert result.size() == torch.Size([64, 10])
  
file_path: garage/tests/garage/torch/modules/test_cnn_module.py
imports: import pickle
  import akro
  import numpy
  import pytest
  import torch
  import torch.nn
  from garage import InOutSpec
  from garage.torch.modules import CNNModule
  from garage.torch.modules.cnn_module import _check_spec
label_desc: Use image node_id 5 for calling the TestCNNModule obj's underlying member method code with example usage: obj.test_output_with_max_pooling(kernel_sizes, hidden_channels, strides, pool_shape, pool_stride) without return types