Hi,
Would it be possible to get a minimal script that reproduces the issue so we can investigate? Also, information about your environment (PyTorch version, etc) would be great as well. Also, this seems like it may be an unexpected bug, so the issues Issues · pytorch/pytorch · GitHub might be a better place for this.