Open cywinski opened 2 years ago
In ops/modules/ms_deform_attn.py, replace
# value, input_spatial_shapes, input_level_start_index, sampling_locations, attention_weights, self.im2col_step)
by: output = ms_deform_attn_core_pytorch(value, input_spatial_shapes, sampling_locations, attention_weights) It seems work for me.
In ops/modules/ms_deform_attn.py, replace
output = MSDeformAttnFunction.apply(
# value, input_spatial_shapes, input_level_start_index, sampling_locations, attention_weights, self.im2col_step)
by: output = ms_deform_attn_core_pytorch(value, input_spatial_shapes, sampling_locations, attention_weights) It seems work for me.
In ops/modules/ms_deform_attn.py, replace
output = MSDeformAttnFunction.apply(
# value, input_spatial_shapes, input_level_start_index, sampling_locations, attention_weights, self.im2col_step)
by: output = ms_deform_attn_core_pytorch(value, input_spatial_shapes, sampling_locations, attention_weights) It seems work for me.
i tried this ,and it really works,but the exported model cann't be used ,it will result some error infomation:(RuntimeError: The size of tensor a (138) must match the size of tensor b (237) at non-singleton dimension 1), so i'll appreciate if you could help me with my problem
Hi, I have been trying to export the 4-scale model with ResNet50 backbone to TorchScript with the following code:
Unfortunately, I get the following error:
When I used
torch.jit.trace()
instead oftorch.jit.script()
I got very similar error. As far as I know, TorchScript currently does not support the custom autograd Function. Will the TorchScript export be supported or is there any known workaround to export the model?