File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -46,7 +46,7 @@ def __init__(
46
46
dtype : Optional [torch .dtype ] = None ,
47
47
** kwargs ) -> None :
48
48
# avoid an init error in the super class by setting padding to 0
49
- if padding_mode == 'zeros' and padding == 'same' and stride > 1 :
49
+ if padding_mode == 'zeros' and padding == 'same' and any ( map ( lambda x : x > 1 , stride )) :
50
50
padding = 0
51
51
is_same_padded_strided = True
52
52
else :
@@ -132,7 +132,7 @@ def __init__(
132
132
dtype : Optional [torch .dtype ] = None ,
133
133
** kwargs ) -> None :
134
134
# avoid an init error in the super class by setting padding to 0
135
- if padding_mode == 'zeros' and padding == 'same' and stride > 1 :
135
+ if padding_mode == 'zeros' and padding == 'same' and any ( map ( lambda x : x > 1 , stride )) :
136
136
padding = 0
137
137
is_same_padded_strided = True
138
138
else :
@@ -220,7 +220,7 @@ def __init__(
220
220
dtype : Optional [torch .dtype ] = None ,
221
221
** kwargs ) -> None :
222
222
# avoid an init error in the super class by setting padding to 0
223
- if padding_mode == 'zeros' and padding == 'same' and stride > 1 :
223
+ if padding_mode == 'zeros' and padding == 'same' and any ( map ( lambda x : x > 1 , stride )) :
224
224
padding = 0
225
225
is_same_padded_strided = True
226
226
else :
You can’t perform that action at this time.
0 commit comments