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