zhengchen1999 / DAT

PyTorch code for our ICCV 2023 paper "Dual Aggregation Transformer for Image Super-Resolution"
Apache License 2.0
386 stars 37 forks source link

How to train on single GPU #19

Open JianjunXiang opened 10 months ago

JianjunXiang commented 10 months ago

Hello, dear author. How can I change the .yml file to train on a single 3090 GPU?

zhengchen1999 commented 10 months ago

You can modify the batch size in the yml.

Additionally, you can set num_gpu=1 and use the following command for single GPU training:

python basicsr/train.py -opt options/Train/train_DAT_light_x2.yml --launcher pytorch
JianjunXiang commented 10 months ago

Thank you very much!

mianhuao commented 1 week ago

很抱歉打扰您,我在服务器上用八个15360MIB的 GPU,报错会显示显存不足,我应该怎样修改哪些参数 屏幕截图 2024-09-18 194859 ,使其能够正常运行 屏幕截图 2024-09-19 200631

zhengchen1999 commented 1 week ago

两种方式:

  1. 训练轻量化模型:options/Train/train_DAT_light_x2.yml
  2. 降低batch size:https://github.com/zhengchen1999/DAT/blob/main/options/Train/train_DAT_2_x2.yml#L26