-
Notifications
You must be signed in to change notification settings - Fork 747
Open
Description
I believe there is a small bug with setting the inference batch size > 1. For example, when running:
python main.py --model FlowNet2 --resume /path/to/dir/flownet2-pytorch/pretrained/FlowNet2_checkpoint.pth.tar --skip_training --skip_validation --inference_dataset ImagesFromFolder --inference_dataset_root ./path/with/images/ --inference_dataset_iext jpg --inference --save_flow --inference_batch_size 2
The following error is thrown:
File "/path/to/dir/pytorch/lib/python3.6/site-packages/torch/nn/modules/module.py", line 477, in __call__
result = self.forward(*input, **kwargs)
File "/path/to/dir/flownet2-pytorch/losses.py", line 21, in forward
lossvalue = torch.abs(output - target).mean()
RuntimeError: The size of tensor a (2) must match the size of tensor b (3) at non-singleton dimension 1
cgokce
Metadata
Metadata
Assignees
Labels
No labels