Higher pytorch verision has a typeError "meshgrid() got an unexpected keyword argument 'indexing'"
Opened this issue · 1 comments
File "/root/autodl-tmp/tph-yolov5/models/common.py", line 259, in init
coords = torch.stack(torch.meshgrid([coords_h, coords_w], indexing="ij")) # [2, Mh, Mw]
TypeError: meshgrid() got an unexpected keyword argument 'indexing'
Deleting ", indexing="ij"" like this can run well. coords = torch.stack(torch.meshgrid([coords_h, coords_w]))
Code cannot running on the device which pytorch version higher than 1.9.0.
There is a similar issue in #20 (comment)
File "/root/autodl-tmp/tph-yolov5/models/common.py", line 259, in init coords = torch.stack(torch.meshgrid([coords_h, coords_w], indexing="ij")) # [2, Mh, Mw] TypeError: meshgrid() got an unexpected keyword argument 'indexing'
Deleting ", indexing="ij"" like this can run well. coords = torch.stack(torch.meshgrid([coords_h, coords_w]))
Code cannot running on the device which pytorch version higher than 1.9.0.
There is a similar issue in #20 (comment)
using pytorch1.10 can slove this problem