@@ -217,8 +217,6 @@ def infer(use_cuda, inference_program, params_dirname):
217
217
# The range of random integers is [low, high]
218
218
word = fluid .create_random_int_lodtensor (
219
219
lod , base_shape , place , low = 0 , high = WORD_DICT_LEN - 1 )
220
- pred = fluid .create_random_int_lodtensor (
221
- lod , base_shape , place , low = 0 , high = PRED_DICT_LEN - 1 )
222
220
ctx_n2 = fluid .create_random_int_lodtensor (
223
221
lod , base_shape , place , low = 0 , high = WORD_DICT_LEN - 1 )
224
222
ctx_n1 = fluid .create_random_int_lodtensor (
@@ -229,18 +227,20 @@ def infer(use_cuda, inference_program, params_dirname):
229
227
lod , base_shape , place , low = 0 , high = WORD_DICT_LEN - 1 )
230
228
ctx_p2 = fluid .create_random_int_lodtensor (
231
229
lod , base_shape , place , low = 0 , high = WORD_DICT_LEN - 1 )
230
+ pred = fluid .create_random_int_lodtensor (
231
+ lod , base_shape , place , low = 0 , high = PRED_DICT_LEN - 1 )
232
232
mark = fluid .create_random_int_lodtensor (
233
233
lod , base_shape , place , low = 0 , high = MARK_DICT_LEN - 1 )
234
234
235
235
results = inferencer .infer (
236
236
{
237
237
'word_data' : word ,
238
- 'verb_data' : pred ,
239
238
'ctx_n2_data' : ctx_n2 ,
240
239
'ctx_n1_data' : ctx_n1 ,
241
240
'ctx_0_data' : ctx_0 ,
242
241
'ctx_p1_data' : ctx_p1 ,
243
242
'ctx_p2_data' : ctx_p2 ,
243
+ 'verb_data' : pred ,
244
244
'mark_data' : mark
245
245
},
246
246
return_numpy = False )
0 commit comments