Solved by ptrblck in post #3 
              
              
                Could you try to call .contiguous() on all expanded tensors? 
I’ve seen a similar issue before and will create an issue in a moment to track it.