open-mmlab / mmaction

An open-source toolbox for action understanding based on PyTorch
https://open-mmlab.github.io/
Apache License 2.0
1.86k stars 352 forks source link

RuntimeError: CUDA out of memory. #126

Closed easoncat closed 4 years ago

easoncat commented 4 years ago

Hello, thanks for your great work! However, when I run the test code python ./tools/test_recognizer.py ./configs/ucf101/tsn_rgb_bninception.py ./data_tools/ucf101/modelzoo/tsn_2d_rgb_bninception_seg3_f1s1_b32_g8-98160339.pth --gpus 1 , then I got 微信图片_20200115162003

Could you help me solve the problem? Thank you very much!

kennymckormick commented 4 years ago

Since our testing script needs to forward 25x10 images for TSN at a time, it may consume too much cuda memory. Once you get the 25x10 input for dataloader, you can split it to several pieces, forward each at a time, it needs much less memory.

easoncat commented 4 years ago

Hi, kennymckormick! Thank you for your help, the problem is solved.