Yep, I understand that I’m doing a wrong thing here, my problem that such cases could be missed very easily, so, maybe pytorch should warn about such cases to make them more obvious.
But have no idea how it should be done :).