@@ -33,8 +33,8 @@ def test_same_padding_corr(self):
3333 tf .reshape (kernel , (1 , - 1 , 1 , 1 )),
3434 padding = "VALID" , data_format = "NHWC" )
3535 outputs = np .squeeze (outputs .numpy ())
36- pos_inp = np .squeeze (np .nonzero (inputs ))
37- pos_out = np .squeeze (np .nonzero (outputs ))
36+ pos_inp = np .squeeze (np .nonzero (inputs > .5 ))
37+ pos_out = np .squeeze (np .nonzero (outputs > .5 ))
3838 padding = padding_ops .same_padding_for_kernel (kshape , True )
3939 self .assertEqual (padding [0 ][0 ], pos_inp - pos_out )
4040
@@ -52,8 +52,8 @@ def test_same_padding_conv(self):
5252 strides = (1 , 1 , 1 , 1 ), padding = "VALID" , data_format = "NHWC" )
5353 outputs = outputs [:, :, (kshape [0 ] - 1 ):- (kshape [0 ] - 1 ), :]
5454 outputs = np .squeeze (outputs .numpy ())
55- pos_inp = np .squeeze (np .nonzero (inputs ))
56- pos_out = np .squeeze (np .nonzero (outputs ))
55+ pos_inp = np .squeeze (np .nonzero (inputs > .5 ))
56+ pos_out = np .squeeze (np .nonzero (outputs > .5 ))
5757 padding = padding_ops .same_padding_for_kernel (kshape , False )
5858 self .assertEqual (padding [0 ][0 ], pos_inp - pos_out )
5959
0 commit comments