You’re clearly trying to use this variant:



 quoniammm:


(float beta, torch.FloatTensor source, float alpha, torch.FloatTensor batch1, torch.FloatTensor batch2, *, torch.FloatTensor out)



The error comes form the fact that one of your tensors is one the GPU, while all of the rest are on the CPU:

invalid combination of arguments - got (int, torch.FloatTensor, int, torch.FloatTensor, torch.cuda.FloatTensor, out=torch.FloatTensor)

You have to either call cuda() on all of your tensors, or on none. If you provide the code that leads to this error, maybe someone could find the bug