@@ -166,6 +166,11 @@ def fn(inpt):
166166 fn (inpt2 )
167167 self .assertEqual (outp1_shape , layer (inpt1 ).shape )
168168
169+ def test_conv1d_valid_output_shapes (self ):
170+ kwargs = {'filters' : 2 , 'kernel_size' : 10 }
171+ with self .assertRaises (ValueError ):
172+ keras .layers .Conv1D (** kwargs )
173+
169174
170175@keras_parameterized .run_all_keras_modes
171176class Conv2DTest (keras_parameterized .TestCase ):
@@ -298,6 +303,11 @@ def test_conv2d_zero_kernel_size(self):
298303 with self .assertRaises (ValueError ):
299304 keras .layers .Conv2D (** kwargs )
300305
306+ def test_conv2d_valid_output_shapes (self ):
307+ kwargs = {'filters' : 2 , 'kernel_size' : 10 }
308+ with self .assertRaises (ValueError ):
309+ keras .layers .Conv2D (** kwargs )
310+
301311
302312@keras_parameterized .run_all_keras_modes
303313class Conv3DTest (keras_parameterized .TestCase ):
@@ -433,6 +443,11 @@ def test_conv3d_dynamic_shape(self):
433443 input_shape = (None , 3 , None , None , None ),
434444 input_data = input_data )
435445
446+ def test_conv3d_valid_output_shapes (self ):
447+ kwargs = {'filters' : 2 , 'kernel_size' : 10 }
448+ with self .assertRaises (ValueError ):
449+ keras .layers .Conv3D (** kwargs )
450+
436451
437452@keras_parameterized .run_all_keras_modes (always_skip_v1 = True )
438453class GroupedConvTest (keras_parameterized .TestCase ):
@@ -518,6 +533,11 @@ def test_conv1d_transpose(self, kwargs, expected_output_shape=None):
518533 test .is_gpu_available (cuda_only = True )):
519534 self ._run_test (kwargs , expected_output_shape )
520535
536+ def test_conv1dtranspose_valid_output_shapes (self ):
537+ kwargs = {'filters' : 2 , 'kernel_size' : 10 }
538+ with self .assertRaises (ValueError ):
539+ keras .layers .Conv1DTranspose (** kwargs )
540+
521541
522542@keras_parameterized .run_all_keras_modes
523543class Conv3DTransposeTest (keras_parameterized .TestCase ):
@@ -551,6 +571,11 @@ def test_conv3d_transpose(self, kwargs, expected_output_shape=None):
551571 if 'data_format' not in kwargs or test .is_gpu_available (cuda_only = True ):
552572 self ._run_test (kwargs , expected_output_shape )
553573
574+ def test_conv3dtanspose_valid_output_shapes (self ):
575+ kwargs = {'filters' : 2 , 'kernel_size' : 10 }
576+ with self .assertRaises (ValueError ):
577+ keras .layers .Conv3DTranspose (** kwargs )
578+
554579
555580@keras_parameterized .run_all_keras_modes
556581class ConvSequentialTest (keras_parameterized .TestCase ):
0 commit comments