glow-pytorch icon indicating copy to clipboard operation
glow-pytorch copied to clipboard

coupling.py is error:The size of tensor a (2) must match the size of tensor b (62) at non-singleton dimension 1

Open oubahe opened this issue 4 years ago • 0 comments

Traceback (most recent call last): File "D:/Productivity/AchievedAlgorithm/Glow-pytorch-master/train.py", line 192, in train(args, model, optimizer) File "D:/Productivity/AchievedAlgorithm/Glow-pytorch-master/train.py", line 139, in train image + torch.rand_like(image) / n_bins File "D:\Anaconda\envs\torch_cpu\lib\site-packages\torch\nn\modules\module.py", line 1051, in _call_impl return forward_call(*input, **kwargs) File "D:\Productivity\AchievedAlgorithm\Glow-pytorch-master\model.py", line 355, in forward out, det, log_p, z_new = block(out) File "D:\Anaconda\envs\torch_cpu\lib\site-packages\torch\nn\modules\module.py", line 1051, in _call_impl return forward_call(*input, **kwargs) File "D:\Productivity\AchievedAlgorithm\Glow-pytorch-master\model.py", line 280, in forward out, det = flow(out) File "D:\Anaconda\envs\torch_cpu\lib\site-packages\torch\nn\modules\module.py", line 1051, in _call_impl return forward_call(*input, **kwargs) File "D:\Productivity\AchievedAlgorithm\Glow-pytorch-master\model.py", line 227, in forward out, logdet = self.actnorm(input) File "D:\Anaconda\envs\torch_cpu\lib\site-packages\torch\nn\modules\module.py", line 1051, in call_impl return forward_call(*input, **kwargs) File "D:\Productivity\AchievedAlgorithm\Glow-pytorch-master\model.py", line 46, in forward self.initialize(input) File "D:\Productivity\AchievedAlgorithm\Glow-pytorch-master\model.py", line 39, in initialize self.loc.data.copy(-mean) RuntimeError: The size of tensor a (12) must match the size of tensor b (4) at non-singleton dimension 1

oubahe avatar Sep 04 '21 06:09 oubahe