def testMaxPooling3DChannelsFirst(self): depth, height, width = 6, 7, 9 images = tf.random.uniform((5, 2, depth, height, width)) layer = pooling_layers.MaxPooling3D( [2, 2, 2], strides=2, data_format='channels_first') output = layer(images) self.assertListEqual(output.get_shape().as_list(), [5, 2, 3, 3, 4])
def testCreateMaxPooling3D(self): depth, height, width = 6, 7, 9 images = tf.random.uniform((5, depth, height, width, 4)) layer = pooling_layers.MaxPooling3D([2, 2, 2], strides=2) output = layer(images) self.assertListEqual(output.get_shape().as_list(), [5, 3, 3, 4, 4])