haofeixu / aanet

[CVPR'20] AANet: Adaptive Aggregation Network for Efficient Stereo Matching
Apache License 2.0
534 stars 102 forks source link

"assert (x.size() == rem.size())" when perform predict.py #12

Closed jingfenglanyun closed 4 years ago

jingfenglanyun commented 4 years ago

commond : "python predict.py --data_dir demo --pretrained_aanet pretrained/aanet+_sceneflow-d3e13ef0.pth --feature_type ganet --feature_pyramid --refinement_type hourglass --no_intermediate_supervision"

error info:

AssertionError: Caught AssertionError in replica 0 on device 0. Original Traceback (most recent call last): File "/anaconda3/lib/python3.7/site-packages/torch/nn/parallel/parallel_apply.py", line 60, in _worker output = module(*input, kwargs) File "/anaconda3/lib/python3.7/site-packages/torch/nn/modules/module.py", line 550, in call result = self.forward(*input, kwargs) File "/aanet/nets/aanet.py", line 213, in forward disparity_pyramid[-1]) File "/aanet/nets/aanet.py", line 198, in disparity_refinement disparity = self.refinementi File "/anaconda3/lib/python3.7/site-packages/torch/nn/modules/module.py", line 550, in call result = self.forward(*input, kwargs) File "/aanet/nets/refinement.py", line 173, in forward x = self.deconv4a(x, rem3) File "/anaconda3/lib/python3.7/site-packages/torch/nn/modules/module.py", line 550, in call result = self.forward(*input, kwargs) File "/aanet/nets/feature.py", line 369, in forward assert (x.size() == rem.size()) AssertionError

debug: (Pdb) p x.shape torch.Size([1, 96, 66, 82]) (Pdb) p rem.shape torch.Size([1, 96, 66, 81]) (Pdb)

haofeixu commented 4 years ago

Fixed.