未验证 提交 02f58862 编写于 作者: L luyao-cv 提交者: GitHub

fix ppdet/utils/states (#8421)

* fix a code

* fix the tensor to float
上级 32ea0434
...@@ -74,7 +74,7 @@ class TrainingStats(object): ...@@ -74,7 +74,7 @@ class TrainingStats(object):
for k in stats.keys() for k in stats.keys()
} }
for k, v in self.meters.items(): for k, v in self.meters.items():
v.update(stats[k].numpy()) v.update(float(stats[k]))
def get(self, extras=None): def get(self, extras=None):
stats = collections.OrderedDict() stats = collections.OrderedDict()
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册