ZhaofanQiu / pseudo-3d-residual-networks

Pseudo-3D Convolutional Residual Networks for Video Representation Learning
MIT License
352 stars 119 forks source link

questions on training with p3d #12

Open yunkaili opened 6 years ago

yunkaili commented 6 years ago

i am currently trying to reimplement on UCF101.

first, when i do the training with p3d-b, i find that the total loss suddenly increases from around 4 to 11, after four or five epoch. did you meet the same problems?

second, how do you come up with doing a two-stage training, finetune p3d on a trained tsn model?

third, why do you decide to decrease the input from 224x224 to 160x160?

ZhaofanQiu commented 6 years ago

Hi,

  1. The loss may be influenced by many factors. Some important points are batch_size (128), dropout ratio (0.9), initialization of temporal convolution (small-std gaussian).
  2. We do not finetune on tsn model, we finetune the model from ImageNet pretrained-model. But if the 2D kernels are pretrained by tsn, the performance may be further improved.
  3. The resolution is decreased due to limited gpu memory and training time. Generally, higher resolution will lead to higher performance. Best.
yunkaili commented 6 years ago

thank you. i think i misunderstand the training scheme.

jetyingjia commented 6 years ago

Hi, 1.first, in the paper, "In the training stage, we set each mini_batch as 128 frames/clips, which are implemented with multiple GPUs in parallel", 128frames/clips means batch_size is 8 for per GPU(128=8*16) or other setting? Thank you in advance!

ZhaofanQiu commented 6 years ago

Hi, It depends on the GPU memory and network architecture. For example, for P3D-ResNet-152, each K40 GPU can contain (around) 4 clip during training. In that case, we use 8 GPU and 8 4=32 clip in total. Then we set the iter_size=4, which means after 32 4=128 clip, the network parameters will be updated. We keep (clip in each GPU) (number of GPU) (iter_size)=128. Best.

yueliusha9 commented 6 years ago

Have you successfully reimplement on UCF101? @yunkaili

gemfield commented 6 years ago

@jiangyin1014 You may have a look at https://zhuanlan.zhihu.com/p/35359709

Guoleming commented 6 years ago

how to set the iter_size ?