isl-org / DPT

Dense Prediction Transformers
MIT License
1.96k stars 254 forks source link

RuntimeError: view size is not compatible with input tensor's size #66

Closed semel1 closed 2 years ago

semel1 commented 2 years ago

Successfully run: python run_monodepth.py -t dpt_large

However attempt to run: python run_monodepth.py (with dpt_hybrid (default) )

I've got an error: RuntimeError: view size is not compatible with input tensor's size and stride (at least one dimension spans across two contiguous subspaces). Use .reshape(...) instead.

My great appreciation for help to resolving this issue. How/where I should "Use .reshape(...) instead." As it suggests ?

olegsinavski commented 2 years ago

@semel1 I faced the same issue and it turned out that my timm version was older than DPT requires. After installing timm==0.4.5 from the requirements, it all works now

semel1 commented 2 years ago

That's work. Thank you