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

question 

When training the swin transformer model, the following error is reported:

Error message: TypeError: meshgrid() got an unexpected keyword argument 'indexing'

reason 

Due to the torch version, there is no indexing parameter, but this parameter is the default.

solve

Just delete indexing="ij" directly, without affecting the program, because it becomes the default parameter.

 

Guess you like

Origin blog.csdn.net/m0_56190554/article/details/130303077