This sounds like a bug or some limitation. Either way, it shouldn’t fail with an assertion failure, the framework should be able to provide a nice error message. Could you file an issue at http://github.com/pytorch/pytorch/ 8 ?