【已解决】TypeError: meshgrid() got an unexpected keyword argument ‘indexing‘

问题 

训练swin transformer模型的时候报以下错误:

报错信息:TypeError: meshgrid() got an unexpected keyword argument 'indexing'

原因 

torch版本导致的,已经没有indexing这个参数了,但是默认就是这个参数。

解决

直接删掉indexing="ij"即可,不影响程序,因为变成了默认参数。

猜你喜欢

转载自blog.csdn.net/m0_56190554/article/details/130303077