-
Notifications
You must be signed in to change notification settings - Fork 13
Description
Save predictions: 0%| | 0/2 [00:00<?, ?it/s]
Traceback (most recent call last):
File "main.py", line 216, in
main(args)
File "main.py", line 191, in main
for sample, x_path in tqdm(ds, desc='Save predictions'):
File "/vsphhome/sunhaoran/anaconda3/envs/hands/lib/python3.7/site-packages/tqdm/std.py", line 1178, in iter
for obj in iterable:
File "main.py", line 158, in getitem
sample["image"] = self.transform(sample["image"])
File "/vsphhome/sunhaoran/anaconda3/envs/hands/lib/python3.7/site-packages/torchvision/transforms/transforms.py", line 60, in call
img = t(img)
File "/vsphhome/sunhaoran/anaconda3/envs/hands/lib/python3.7/site-packages/torch/nn/modules/module.py", line 889, in call_impl
result = self.forward(*input, **kwargs)
File "/vsphhome/sunhaoran/anaconda3/envs/hands/lib/python3.7/site-packages/torchvision/transforms/transforms.py", line 221, in forward
return F.normalize(tensor, self.mean, self.std, self.inplace)
File "/vsphhome/sunhaoran/anaconda3/envs/hands/lib/python3.7/site-packages/torchvision/transforms/functional.py", line 336, in normalize
tensor.sub(mean).div_(std)
RuntimeError: The size of tensor a (12) must match the size of tensor b (3) at non-singleton dimension 0
When I use a .png fie as input to predict by predict.sh, the error is above