@@ -189,7 +189,7 @@ def check_static_result_1(self, place):
189
189
value = 100
190
190
input_data = np .random .rand (* input_shape ).astype (self .dtype )
191
191
x = paddle .static .data (
192
- name = "x" , shape = input_shape , dtype = "float32"
192
+ name = "x" , shape = input_shape , dtype = self . dtype
193
193
)
194
194
result = F .pad (
195
195
x = x , pad = pad , value = value , mode = mode , data_format = "NCDHW"
@@ -212,7 +212,7 @@ def check_static_result_2(self, place):
212
212
mode = "reflect"
213
213
input_data = np .random .rand (* input_shape ).astype (self .dtype )
214
214
x = paddle .static .data (
215
- name = "x" , shape = input_shape , dtype = "float32"
215
+ name = "x" , shape = input_shape , dtype = self . dtype
216
216
)
217
217
result1 = F .pad (x = x , pad = pad , mode = mode , data_format = "NCDHW" )
218
218
result2 = F .pad (x = x , pad = pad , mode = mode , data_format = "NDHWC" )
@@ -240,7 +240,7 @@ def check_static_result_3(self, place):
240
240
mode = "replicate"
241
241
input_data = np .random .rand (* input_shape ).astype (self .dtype )
242
242
x = paddle .static .data (
243
- name = "x" , shape = input_shape , dtype = "float32"
243
+ name = "x" , shape = input_shape , dtype = self . dtype
244
244
)
245
245
result1 = F .pad (x = x , pad = pad , mode = mode , data_format = "NCDHW" )
246
246
result2 = F .pad (x = x , pad = pad , mode = mode , data_format = "NDHWC" )
0 commit comments