Skip to content

Commit a3408d0

Browse files
authored
Merge pull request #11356 from typhoonzero/fix_fluix_benchmark_error
Fix fluid_benchmark stacked_dynamic_lstm model error
2 parents b3fd9da + 799a3aa commit a3408d0

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

benchmark/fluid/models/stacked_dynamic_lstm.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,8 +104,9 @@ def gate_common(
104104
loss = fluid.layers.mean(x=loss)
105105

106106
# add acc
107+
batch_size_tensor = fluid.layers.create_tensor(dtype='int64')
107108
batch_acc = fluid.layers.accuracy(input=logit, label=fluid.layers.data(name='label', \
108-
shape=[1], dtype='int64'))
109+
shape=[1], dtype='int64'), total=batch_size_tensor)
109110

110111
inference_program = fluid.default_main_program().clone()
111112
with fluid.program_guard(inference_program):

0 commit comments

Comments
 (0)