bachzz / UW-DiffPhys

MIT License
7 stars 2 forks source link

训练出现张量大小问题 #3

Open Liurongfen opened 3 weeks ago

Liurongfen commented 3 weeks ago

(DiffPhys) PS E:\LRF\UW-DiffPhys-main (2)\UW-DiffPhys-main> python train_UW-DDIM.py --config underwater_lsui_uieb_256.yml Using device: cuda => using dataset 'LSUI_UIEB111' => creating denoising-diffusion model... Input filenames: ['datasets/LSUI_UIEB/train/raw\2img.png', 'datasets/LSUI_UIEB/train/raw\3img.png', 'datasets/LSUI_UIEB/train/raw\8img.png'] Ground truth filenames: ['datasets/LSUI_UIEB/train/ref\2img.png', 'datasets/LSUI_UIEB/train/ref\3img.png', 'datasets/LSUI_UIEB/train/ref\8img.png'] Input filenames: ['datasets/LSUI_UIEB/val/raw\57img.png'] Ground truth filenames: ['datasets/LSUI_UIEB/val/ref\57img.png'] 3 epoch: 0 Traceback (most recent call last): File "E:\LRF\UW-DiffPhys-main (2)\UW-DiffPhys-main\train_UW-DDIM.py", line 75, in main() File "E:\LRF\UW-DiffPhys-main (2)\UW-DiffPhys-main\train_UW-DDIM.py", line 71, in main diffusion.train(DATASET) File "E:\LRF\UW-DiffPhys-main (2)\UW-DiffPhys-main\models\uw_ddm.py", line 519, in train loss_theta = noise_estimation_loss(criterion, self.model_theta, x[:, :3, :, :], t, e, b) File "E:\LRF\UW-DiffPhys-main (2)\UW-DiffPhys-main\models\uw_ddm.py", line 356, in noise_estimation_loss x = x0 a.sqrt() + e (1.0 - a).sqrt() RuntimeError: The size of tensor a (3) must match the size of tensor b (5) at non-singleton dimension 1

训练出现张量大小问题

Rizwanali324 commented 5 days ago

can you share requirements txt file

(DiffPhys) PS E:\LRF\UW-DiffPhys-main (2)\UW-DiffPhys-main> python train_UW-DDIM.py --config underwater_lsui_uieb_256.yml Using device: cuda => using dataset 'LSUI_UIEB111' => creating denoising-diffusion model... Input filenames: ['datasets/LSUI_UIEB/train/raw\2img.png', 'datasets/LSUI_UIEB/train/raw\3img.png', 'datasets/LSUI_UIEB/train/raw\8img.png'] Ground truth filenames: ['datasets/LSUI_UIEB/train/ref\2img.png', 'datasets/LSUI_UIEB/train/ref\3img.png', 'datasets/LSUI_UIEB/train/ref\8img.png'] Input filenames: ['datasets/LSUI_UIEB/val/raw\57img.png'] Ground truth filenames: ['datasets/LSUI_UIEB/val/ref\57img.png'] 3 epoch: 0 Traceback (most recent call last): File "E:\LRF\UW-DiffPhys-main (2)\UW-DiffPhys-main\train_UW-DDIM.py", line 75, in main() File "E:\LRF\UW-DiffPhys-main (2)\UW-DiffPhys-main\train_UW-DDIM.py", line 71, in main diffusion.train(DATASET) File "E:\LRF\UW-DiffPhys-main (2)\UW-DiffPhys-main\models\uw_ddm.py", line 519, in train loss_theta = noise_estimation_loss(criterion, self.model_theta, x[:, :3, :, :], t, e, b) File "E:\LRF\UW-DiffPhys-main (2)\UW-DiffPhys-main\models\uw_ddm.py", line 356, in noise_estimation_loss x = x0 a.sqrt() + e (1.0 - a).sqrt() RuntimeError: The size of tensor a (3) must match the size of tensor b (5) at non-singleton dimension 1

训练出现张量大小问题

can you share requirements txt file