warnings.warn(warning.format(ret))
0%| | 0/300 [00:00<?, ?it/s]
Traceback (most recent call last):
File "G:/STUDY CODE/CSRNet/CSRNet-pytorch-master/train.py", line 29, in
for i, data in enumerate(tqdm(train_dataloader)):
File "D:\Anaconda3\envs\pytorch\lib\site-packages\tqdm\std.py", line 1129, in iter
for obj in iterable:
File "D:\Anaconda3\envs\pytorch\lib\site-packages\torch\utils\data\dataloader.py", line 615, in next
batch = self.collate_fn([self.dataset[i] for i in indices])
File "D:\Anaconda3\envs\pytorch\lib\site-packages\torch\utils\data\dataloader.py", line 615, in
batch = self.collate_fn([self.dataset[i] for i in indices])
File "G:\STUDY CODE\CSRNet\CSRNet-pytorch-master\dataset.py", line 50, in getitem
dmap = self.dmap_transform(dmap)
File "D:\Anaconda3\envs\pytorch\lib\site-packages\torchvision\transforms\transforms.py", line 61, in call
return F.to_tensor(pic)
File "D:\Anaconda3\envs\pytorch\lib\site-packages\torchvision\transforms\functional.py", line 71, in to_tensor
img = img.view(pic.size[1], pic.size[0], nchannel)
RuntimeError: shape '[1024, 832, 1]' is invalid for input of size 3407872
When I try to run train.py,I met the Error above,I can't found the reason,could you please help me.
warnings.warn(warning.format(ret)) 0%| | 0/300 [00:00<?, ?it/s] Traceback (most recent call last): File "G:/STUDY CODE/CSRNet/CSRNet-pytorch-master/train.py", line 29, in
for i, data in enumerate(tqdm(train_dataloader)):
File "D:\Anaconda3\envs\pytorch\lib\site-packages\tqdm\std.py", line 1129, in iter
for obj in iterable:
File "D:\Anaconda3\envs\pytorch\lib\site-packages\torch\utils\data\dataloader.py", line 615, in next
batch = self.collate_fn([self.dataset[i] for i in indices])
File "D:\Anaconda3\envs\pytorch\lib\site-packages\torch\utils\data\dataloader.py", line 615, in
batch = self.collate_fn([self.dataset[i] for i in indices])
File "G:\STUDY CODE\CSRNet\CSRNet-pytorch-master\dataset.py", line 50, in getitem
dmap = self.dmap_transform(dmap)
File "D:\Anaconda3\envs\pytorch\lib\site-packages\torchvision\transforms\transforms.py", line 61, in call
return F.to_tensor(pic)
File "D:\Anaconda3\envs\pytorch\lib\site-packages\torchvision\transforms\functional.py", line 71, in to_tensor
img = img.view(pic.size[1], pic.size[0], nchannel)
RuntimeError: shape '[1024, 832, 1]' is invalid for input of size 3407872
When I try to run train.py,I met the Error above,I can't found the reason,could you please help me.