Open slerman12 opened 3 years ago
Do you know how many iterations it's trained?
One epoch consists if all possible video clips in the dataset. For UCF101, there are 9537 clips of length ~240, so that's around ~2 million clips, so a batch size of 32 would be around 60k iterations. If you're using lower batch sizes then it'd be even more iterations.
I recommend training with flags --val_check_interval 5000
(# of iterations between val checks) and --limit_val_batches 500
(or some lower but reasonable number since it might take a long time for the whole set)
By iterations, you mean how much of the epoch? When I checked, it had reached 100% and had completed the whole epoch, but no more than that. A whole day for 1 epoch seems extreme. How long does the model normally take to run? 100000 epochs is a lot, but I thought 4 V100s would suffice. Unless I did something wrong.
4 V100s should suffice. By iterations, I mean training steps, so training for 200k iterations is only ~2-3 epochs. The total training time should be ~2 days.
I'll try adding those val_check and limit_val commands. It's so strange, a single Epoch actually took >50 hrs:
Epoch 0: 100%|██████████| 71360/71360 [50:55:33<00:00, 2.57s/it, loss=3.64, v_num=6635713, val/loss=3.690]
This is on 4 V100s
Hmm the 2.57s/it actually doesn't seem too off. You can get a good amount of speed-up (~2x) and lower gpu memory costs (~0.5x) if you train with sparse attention and/or mixed precision: attn_type 'sparse' --amp_level O1 --precision 16
(sparse attention will need to be installed before using it). Though I've found that sometimes the mixed precision is unstable depending on what kind of model is being trained (i.e. usually works with unconditional, but seems to be more unstable when training class-conditional).
I'm running the model on 4 V100 GPUs using SLURM and the following sbatch script:
However, after a full day, the logs still show the model stuck at epoch 0.
Do you know what's going wrong?
Thank you.