未验证 提交 a3408d00 编写于 作者: S sneaxiy 提交者: GitHub

Merge pull request #11356 from typhoonzero/fix_fluix_benchmark_error

Fix fluid_benchmark stacked_dynamic_lstm model error
...@@ -104,8 +104,9 @@ def get_model(args): ...@@ -104,8 +104,9 @@ def get_model(args):
loss = fluid.layers.mean(x=loss) loss = fluid.layers.mean(x=loss)
# add acc # add acc
batch_size_tensor = fluid.layers.create_tensor(dtype='int64')
batch_acc = fluid.layers.accuracy(input=logit, label=fluid.layers.data(name='label', \ batch_acc = fluid.layers.accuracy(input=logit, label=fluid.layers.data(name='label', \
shape=[1], dtype='int64')) shape=[1], dtype='int64'), total=batch_size_tensor)
inference_program = fluid.default_main_program().clone() inference_program = fluid.default_main_program().clone()
with fluid.program_guard(inference_program): with fluid.program_guard(inference_program):
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册