Hi,
As mentioned in the error message, the Tensors you give to the cat operations are on different devices which is not allowed. You need to move all the Tensors to the same device before calling cat.