diff --git a/examples/bmn/bmn_metric.py b/examples/bmn/bmn_metric.py index f9bf101f825913572803fbb1168260f83a0d96ac..d8e0d3e3ae307c9fa61000e336b4ef6864f956f2 100644 --- a/examples/bmn/bmn_metric.py +++ b/examples/bmn/bmn_metric.py @@ -39,11 +39,6 @@ class BmnMetric(Metric): elif self.mode == 'infer': 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): # generate proposals pred_start = pred_start[0] diff --git a/hapi/model.py b/hapi/model.py index 05e8cec4c90ff401f68792b347843ef77643b85c..460916684c52b86ae1b76d8d0da801fd3b6e0cec 100644 --- a/hapi/model.py +++ b/hapi/model.py @@ -67,7 +67,7 @@ def to_list(value): if value is None: return value if isinstance(value, (list, tuple)): - return value + return list(value) return [value]