huawei-noah / Pretrained-IPT

Apache License 2.0
434 stars 63 forks source link

RuntimeError: CUDA out of memory. Tried to allocate 118.00 MiB (GPU 0; 2.00 GiB total capacity; 1.19 GiB already allocated; 0 bytes free; 1.27 GiB reserved in total by PyTorch) #33

Closed oneonejia closed 2 years ago

oneonejia commented 2 years ago

输入python main.py --dir_data test_data --pretrain model/IPT_sr2.pt --data_test Set5 --scale 1 出现了 Making model... Preparing loss function: 1.000 * L1 Evaluation: 0%| | 0/5 [00:00<?, ?it/s] RuntimeError: CUDA out of memory. Tried to allocate 118.00 MiB (GPU 0; 2.00 GiB total capacity; 1.19 GiB already allocated; 0 bytes free; 1.27 GiB reserved in total by PyTorch) 但是只有一个显卡,该怎么处理呢

HantingChen commented 2 years ago

请尝试减少--crop_batch_size