Example #1
0
 def testAveragePooling3DChannelsFirst(self):
   depth, height, width = 6, 7, 9
   images = tf.random.uniform((5, 2, depth, height, width))
   layer = pooling_layers.AveragePooling3D(
       [2, 2, 2], strides=2, data_format='channels_first')
   output = layer(images)
   self.assertListEqual(output.get_shape().as_list(), [5, 2, 3, 3, 4])
Example #2
0
 def testCreateAveragePooling3D(self):
     depth, height, width = 6, 7, 9
     images = tf.random.uniform((5, depth, height, width, 4))
     layer = pooling_layers.AveragePooling3D([2, 2, 2], strides=2)
     output = layer(images)
     self.assertListEqual(output.get_shape().as_list(), [5, 3, 3, 4, 4])