当您退出 MobaXterm 时,脱机执行可以通过以下步骤完成:

  1. 在 MobaXterm 中运行您的脚本,脚本将继续在 MobaXterm 中运行,直到完成或遇到错误。

  2. 关闭 MobaXterm 窗口后,脚本将停止运行。

  3. 如果您希望在没有 MobaXterm 的情况下继续执行脚本,可以使用 nohup 命令。例如:

nohup sh distributed_train.sh $NUM_GPU $DATA_PATH \
--model convformer_b36 --opt adamw --lr 4e-3 --warmup-epochs 20 \
-b $BATCH_SIZE --grad-accum-steps $GRAD_ACCUM_STEPS \
--drop-path 0.6 --head-dropout 0.0 --resume /mnt/disk1/lh/code/metaformer/convformer_b36_in21ft1k.pth &

在这种情况下,脚本将在后台运行,并将输出写入 nohup.out 文件中。您可以通过查看该文件来监视脚本的运行情况。

请注意,使用 nohup 命令运行脚本后,即使关闭终端窗口,脚本也将继续运行。要停止脚本的运行,您可以使用 kill 命令杀死脚本的进程

DATA_PATH=mntdisk1lhlandmark0823imagenetCODE_PATH=mntdisk1lhcodemetaformer # modify code path hereCUDA_VISIBLE_DEVICES=0123ALL_BATCH_SIZE=512NUM_GPU=4GRAD_ACCUM_STEPS=32 # Adjust according to your GPU

原文地址: http://www.cveoy.top/t/topic/iTxA 著作权归作者所有。请勿转载和采集!

免费AI点我,无需注册和登录