Based on the error message, I think the error is not coming from this rmse_loss but somewhere in the forward function of model is causing this error. The reason is the error message says argument #3, but this line has only 2 arguments.
Also, you can check the device attribute of both factors and product to make sure that they are in fact on CUDA device.