Skip to content

Commit f98c757

Browse files
committed
metric to fix 2-class
1 parent 73f4429 commit f98c757

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

paddlevideo/metrics/skeleton_metric.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ def update(self, batch_id, data, outputs):
5050
if len(data) == 2: # data with label
5151
labels = data[1]
5252
top1 = paddle.metric.accuracy(input=outputs, label=labels, k=1)
53-
top5 = paddle.metric.accuracy(input=outputs, label=labels, k=5)
53+
top5 = paddle.metric.accuracy(input=outputs, label=labels, k=2)
5454
if self.world_size > 1:
5555
top1 = paddle.distributed.all_reduce(
5656
top1, op=paddle.distributed.ReduceOp.SUM) / self.world_size

paddlevideo/tasks/test.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,4 +84,5 @@ def test_model(cfg, weights, parallel=True):
8484
else:
8585
outputs = model(data, mode='test')
8686
Metric.update(batch_id, data, outputs)
87+
print(outputs)
8788
Metric.accumulate()

0 commit comments

Comments
 (0)