Roc-Ng / DeepMIL

Real-world Anomaly Detection in Surveillance Videos CVPR2018 UCF-Crime dataset
119 stars 11 forks source link

Getting features from DataLoader takes up too much GPU memory #23

Closed mnik17 closed 2 years ago

mnik17 commented 2 years ago

Hi @Roc-Ng,

I extracted some features using https://github.com/piergiaj/pytorch-i3d, which you referenced in #2 . Currently the shape of my features looks exactly like yours: (n, 1024), where n depends on the number of frames in the sequence. The most it may be is 35.

However in train.py, when I try to get data from the DataLoader in line 35:

n_iter = iter(nloader)
a_iter = iter(aloader)

it takes up all my GPU memory, which is 10GB. I can't find any reasonable explanation as to why is it taking so much memory. Do you have any hints?

mnik17 commented 2 years ago

I reduced the number of workers from options.py and the memory problems disappeared.