code: def test_output_value_max_pooling(
      self, filters, in_channels, strides, pool_strides, pool_shapes
  ):
      model = CNNModelWithMaxPooling(
          input_dim=self.input_dim,
          filters=filters,
          strides=strides,
          name="cnn_model",
          padding="VALID",
          pool_strides=pool_strides,
          pool_shapes=pool_shapes,
          hidden_w_init=tf.constant_initializer(1),
          hidden_nonlinearity=None,
      )
  
      outputs = model.build(self._input_ph).outputs
      output = self.sess.run(
          outputs, feed_dict={self._input_ph: self.obs_input}
      )
  
      filter_sum = 1
      # filter value after 3 layers of conv
      for filter_iter, in_channel in zip(filters, in_channels):
          filter_sum *= (
              filter_iter[1][0] * filter_iter[1][1] * in_channel
          )
  
      height_size = self.input_height
      width_size = self.input_width
      for filter_iter, stride in zip(filters, strides):
          height_size = (
              int((height_size - filter_iter[1][0]) / stride) + 1
          )
          height_size = (
              int((height_size - pool_shapes[0]) / pool_strides[0]) + 1
          )
          width_size = (
              int((width_size - filter_iter[1][1]) / stride) + 1
          )
          width_size = (
              int((width_size - pool_shapes[1]) / pool_strides[1]) + 1
          )
  
      flatten_shape = height_size * width_size * filters[-1][0]
  
      # flatten
      expected_output = np.full(
          (self.batch_size, flatten_shape), filter_sum, dtype=np.float32
      )
  
      assert np.array_equal(output, expected_output)
  
file_path: garage/tests/garage/tf/models/test_cnn_model.py
imports: import pickle
  import numpy
  import pytest
  import tensorflow
  from garage.tf.models import CNNModel, CNNModelWithMaxPooling
  from tests.fixtures import TfGraphTestCase
label_desc: Use image node_id 3 for calling the TestCNNModel obj's underlying member method code with example usage: obj.test_output_value_max_pooling(filters, in_channels, strides, pool_strides, pool_shapes) without return types