When num_feature_levels = 4, here is the error (ref_frame_num = 10):
File "deformable_transformer_multi.py", line 231, in forward
ref_spatial_shapes = spatial_shapes.expand(BS,self.num_ref_frames, 2).contiguous()
RuntimeError: The expanded size of the tensor (10) must match the existing size (4) at non-singleton dimension 1. Target sizes: [1, 10, 2]. Tensor sizes: [4, 2]
I can run the code when num_feature_levels = 1.
When num_feature_levels = 4, here is the error (ref_frame_num = 10):
File "deformable_transformer_multi.py", line 231, in forward ref_spatial_shapes = spatial_shapes.expand(BS,self.num_ref_frames, 2).contiguous() RuntimeError: The expanded size of the tensor (10) must match the existing size (4) at non-singleton dimension 1. Target sizes: [1, 10, 2]. Tensor sizes: [4, 2]