Open Dagoli opened 1 year ago
Please try to install Pytorch Correlation from source:
git clone https://github.com/ClementPinard/Pytorch-Correlation-extension.git
cd Pytorch-Correlation-extension
python setup.py install
cd -
Is there a way to run without spatial_correlation_sampler? Can I run with pure pytorch?
python3 tools/demo.py Build AOT model. No module named 'spatial_correlation_sampler' Failed to import PyTorch Correlation, For better efficiency, please install it. No module named 'spatial_correlation_sampler' Failed to import PyTorch Correlation, For better efficiency, please install it. No module named 'spatial_correlation_sampler' Failed to import PyTorch Correlation, For better efficiency, please install it. Load checkpoint from ./pretrain_models/R50_AOTL_PRE_YTB_DAV.pth Build AOT engine. Build a dataset for sequence 1007_YCTBBdbKSSg. Build a dataset for sequence 1001_3iEIq5HBY1s. Build a dataloader for sequence 1007_YCTBBdbKSSg. Start the inference of sequence 1007_YCTBBdbKSSg: Object number: 43. Inference size: 577x1041. Output size: 1080x1920. /usr/local/corex-3.1.0/lib64/python3/dist-packages/torch/functional.py:445: UserWarning: torch.meshgrid: in an upcoming release, it will be required to pass the indexing argument. (Triggered internally at /opt/apps/pytorch/aten/src/ATen/native/TensorShape.cpp:2156.) return _VF.meshgrid(tensors, kwargs) # type: ignore[attr-defined] ./networks/layers/position.py:63: UserWarning: floordiv is deprecated, and its behavior will change in a future version of pytorch. It currently rounds toward 0 (like the 'trunc' function NOT 'floor'). This results in incorrect rounding for negative values. To keep the current behavior, use torch.div(a, b, rounding_mode='trunc'), or for actual floor division, use torch.div(a, b, rounding_mode='floor'). dim_t = self.temperature(2 (dim_t // 2) / self.num_pos_feats) Traceback (most recent call last): File "tools/demo.py", line 286, in
main()
File "tools/demo.py", line 282, in main
demo(cfg)
File "tools/demo.py", line 204, in demo
obj_nums=obj_nums)
File "./networks/engines/aot_engine.py", line 605, in add_reference_frame
img_embs=img_embs)
File "./networks/engines/aot_engine.py", line 239, in add_reference_frame
size_2d=self.enc_size_2d)
File "./networks/models/aot.py", line 105, in LSTT_forward
pos_emb, size_2d)
File "/usr/local/corex-3.1.0/lib64/python3/dist-packages/torch/nn/modules/module.py", line 1102, in _call_impl
return forward_call( input, kwargs)
File "./networks/layers/transformer.py", line 113, in forward
size_2d=size_2d)
File "/usr/local/corex-3.1.0/lib64/python3/dist-packages/torch/nn/modules/module.py", line 1102, in _call_impl
return forward_call(*input, *kwargs)
File "./networks/layers/transformer.py", line 352, in forward
tgt3 = self.short_term_attn(local_Q, local_K, local_V)[0]
File "/usr/local/corex-3.1.0/lib64/python3/dist-packages/torch/nn/modules/module.py", line 1102, in _call_impl
return forward_call(input, kwargs)
File "./networks/layers/attention.py", line 525, in forward
output = agg_value + agg_bias
RuntimeError: The size of tensor a (32) must match the size of tensor b (256) at non-singleton dimension 3