xinntao / Real-ESRGAN

Real-ESRGAN aims at developing Practical Algorithms for General Image/Video Restoration.
BSD 3-Clause "New" or "Revised" License
27.2k stars 3.42k forks source link

在train时报错:AssertionError: queue size should be divisible by batch size #151

Open 526460049 opened 2 years ago

526460049 commented 2 years ago

我使用的是Flickr2K和DIV2K的HR图片,没有进行任何处理,作为训练数据集,不知道为何报错assert self.queue_size % b == 0, 'queue size should be divisible by batch size' AssertionError: queue size should be divisible by batch size

610821216 commented 2 years ago

我也有相同問題

zhangyunming commented 2 years ago

same issue

zhangyunming commented 2 years ago

换一下batch大小 试几个

610821216 commented 2 years ago

我換了後batch size 可以 但 是訓練時間非常的漫長 只有單個GPU

usutdzxych commented 2 years ago

num_gpu: 1 batch_size_per_gpu: 2 num_worker_per_gpu: 1 可以改成绝对路径 dataroot_gt: G:\program\python\super-resolution\Real-ESRGAN-master\Real-ESRGAN-master\scripts\datasets\DF2K meta_info: G:\program\python\super-resolution\Real-ESRGAN-master\Real-ESRGAN-master\scripts\datasets\DF2K\meta_info\meta_info_DF2Kmultiscale.txt

pretrain_network_g: G:\program\python\super-resolution\Real-ESRGAN-master\Real-ESRGAN-master\experiments\pretrained_models\ESRGAN_SRx4_DF2KOST_official-ff704c30.pth

610821216 commented 2 years ago

我不是用DIV2K Flickr2K OST 之類的dataset...我一樣只需更改train_realesrnet_x4plus.yml嗎?

tszssong commented 2 years ago

yml文件里有个queue_size,需要是batch_size的整数倍

UESTCrookieLI commented 2 years ago

queue size should be divisible by batch size. it means that you should confirm: batch_size_per_gpu num_gpu = queue_size integer