Esempio n. 1
0
 def test_2d_params(self):
     x = layer_blocks.InceptionBlockV2(
         conv_dim=2,
         filters_pool=3,
         filters_1x1=4,
         filters_3x3=(5, 6),
         filters_3x3dbl=(7, 8),
     )(self.inp_2d)
     self.assertEqual(tf.keras.Model(self.inp_2d, x).count_params(), 450)
Esempio n. 2
0
 def test_shape_2d(self):
     x = layer_blocks.InceptionBlockV2(
         conv_dim=2,
         filters_pool=3,
         filters_1x1=4,
         filters_3x3=(5, 6),
         filters_3x3dbl=(7, 8),
     )(self.inp_2d)
     self.assertSequenceEqual(
         tf.keras.Model(self.inp_2d, x).output_shape, (None, 10, 10, 21))
Esempio n. 3
0
 def test_shape_3d_strides(self):
     x = layer_blocks.InceptionBlockV2(
         conv_dim=3,
         filters_pool=3,
         filters_1x1=4,
         filters_3x3=(5, 6),
         filters_3x3dbl=(7, 8),
         strides=2,
     )(self.inp_3d)
     self.assertSequenceEqual(
         tf.keras.Model(self.inp_3d, x).output_shape, (None, 5, 5, 5, 15))