DirtyHarryLYL/HAKE-Action-Torch

train this model only use one GPU / batchsize =1

mayuefighting opened this issue · 2 comments

when I read this code ,I find this code only can be trained by using one GPU ,meanwhile ,it‘s batchsize=1
I want to ask why .and wheather imfact the result when use batchsize=2or3or4?

读代码的时候发现,代码中只能用单卡训练,并且batchsize只能等于1。还有assert batchsize==1 请问这样做的目的是为什么呢?

hwfan commented

Thanks for playing with Activity2Vec! The code asserts batchsize == 1 because the images from the train/test set don't have the same size and thus couldn't be directly concatenated. If you want to perform learning on image batches, you can resize the images to the same size in the dataloader. With this modification, you can also implement multi-gpu training in the train_net.py.

thanks!