提交 e449b191 编写于 作者: O ouyangyu

refine

上级 51629020
......@@ -145,7 +145,7 @@ class Metric(object):
output = outputs[key].numpy()
assert isinstance(output, np.ndarray)
if micro_batches is None:
micro_batches = output.shape[0]
micro_batches = output.shape[0] if output.shape else 1
else:
assert micro_batches == output.shape[0]
self.kv_store_[key] += output.sum()
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册