@@ -398,6 +398,24 @@ def test_conv2d_6(self):
398
398
kernel_val = np .arange (1 , 1 + np .prod (kernel_shape )).astype ("float32" ).reshape (kernel_shape )
399
399
self ._conv_test (x_val , kernel_val , strides = strides , padding = "VALID" , rtol = 1e-05 )
400
400
401
+ def test_conv2d_dilation_same (self ):
402
+ x_shape = [1 , 35 , 35 , 288 ] # NHWC
403
+ kernel_shape = [3 , 3 , 288 , 384 ] # [filter_height, filter_width, in_channels, out_channels]
404
+ strides = [1 , 1 , 1 , 1 ] # NHWC
405
+ dilations = [1 , 3 , 1 , 1 ] # NHWC
406
+ x_val = np .arange (1 , 1 + np .prod (x_shape )).astype ("float32" ).reshape (x_shape )
407
+ kernel_val = np .arange (1 , 1 + np .prod (kernel_shape )).astype ("float32" ).reshape (kernel_shape )
408
+ self ._conv_test (x_val , kernel_val , strides = strides , padding = "SAME" , dilations = dilations , rtol = 1e-05 )
409
+
410
+ def test_conv2d_dilation_strides_same (self ):
411
+ x_shape = [1 , 35 , 35 , 288 ] # NHWC
412
+ kernel_shape = [3 , 3 , 288 , 384 ] # [filter_height, filter_width, in_channels, out_channels]
413
+ strides = [1 , 2 , 4 , 1 ] # NHWC
414
+ dilations = [1 , 3 , 1 , 1 ] # NHWC
415
+ x_val = np .arange (1 , 1 + np .prod (x_shape )).astype ("float32" ).reshape (x_shape )
416
+ kernel_val = np .arange (1 , 1 + np .prod (kernel_shape )).astype ("float32" ).reshape (kernel_shape )
417
+ self ._conv_test (x_val , kernel_val , strides = strides , padding = "SAME" , dilations = dilations , rtol = 1e-05 )
418
+
401
419
def test_conv3d_1 (self ):
402
420
strides = [1 , 1 , 1 , 1 , 1 ]
403
421
dilations = [1 , 1 , 1 , 1 , 1 ]
0 commit comments