facebookresearch / facebookresearch/SlowFast

PLease make the code to support the situation that action classes are less than 5

Open
#326 11 comments 0 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
7.4k
Forks
1.3k
PR merge metrics
No merged PRs in 30d

Description

If my action class num is less than 5, the top5 make no sense, and it will report error : "RuntimeError: invalid argument 5: k not in range for dimension at /pytorch/aten/src/THC/generic/THCTensorTopK.c". If i change (1,5) to (1) at [here](https://github.com/facebookresearch/SlowFast/blob/fd41618191d3c21c1ca21a61369ce9917646cf9c/tools/train_net.py#L113), it will cause continuous errors, so the code need to be more flexbile.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.