diff --git a/PaddleCV/video/models/tsm/README.md b/PaddleCV/video/models/tsm/README.md index 0fe81f7d1019f86988366eea15b10d514b82fa0c..a92945104c65fc7bcfa7dcac5b3b0485a44a194b 100644 --- a/PaddleCV/video/models/tsm/README.md +++ b/PaddleCV/video/models/tsm/README.md @@ -34,6 +34,9 @@ TSM的训练数据采用由DeepMind公布的Kinetics-400动作识别数据集。 数据准备完毕后,可以通过如下两种方式启动训练: + export FLAGS_fast_eager_deletion_mode=1 + export FLAGS_eager_delete_tensor_gb=0.0 + export FLAGS_fraction_of_gpu_memory_to_use=0.98 python train.py --model_name=TSM --config=./configs/tsm.txt --save_dir=checkpoints diff --git a/PaddleCV/video/scripts/train/train_tsm.sh b/PaddleCV/video/scripts/train/train_tsm.sh index d09096637211f70889d00b5a68f1dcd5df010cc2..dcab59f79dc4ed987683987f1e3da14ad497b56f 100644 --- a/PaddleCV/video/scripts/train/train_tsm.sh +++ b/PaddleCV/video/scripts/train/train_tsm.sh @@ -1,3 +1,9 @@ export CUDA_VISIBLE_DEVICES=0,1,2,3,4,5,6,7 + +# activate eager gc to reduce memory use +export FLAGS_fast_eager_deletion_mode=1 +export FLAGS_eager_delete_tensor_gb=0.0 +export FLAGS_fraction_of_gpu_memory_to_use=0.98 + python train.py --model_name="TSM" --config=./configs/tsm.txt --epoch_num=65 \ --valid_interval=1 --log_interval=10