提交 6f7956f7 编写于 作者: D dengkaipeng

fix bmn metric

上级 2cc2c848
...@@ -39,11 +39,6 @@ class BmnMetric(Metric): ...@@ -39,11 +39,6 @@ class BmnMetric(Metric):
elif self.mode == 'infer': elif self.mode == 'infer':
self.get_infer_dataset_dict() self.get_infer_dataset_dict()
def add_metric_op(self, preds, label):
pred_bm, pred_start, pred_en = preds
video_index = label[-1]
return [pred_bm, pred_start, pred_en, video_index] #return list
def update(self, pred_bm, pred_start, pred_end, fid): def update(self, pred_bm, pred_start, pred_end, fid):
# generate proposals # generate proposals
pred_start = pred_start[0] pred_start = pred_start[0]
......
...@@ -67,7 +67,7 @@ def to_list(value): ...@@ -67,7 +67,7 @@ def to_list(value):
if value is None: if value is None:
return value return value
if isinstance(value, (list, tuple)): if isinstance(value, (list, tuple)):
return value return list(value)
return [value] return [value]
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册