For context, my model consists of 2 separate NNs in which their outputs are added together to give the final output. The input (generated from the dataloader) is a dictionary with keys corresponding to the respective NN it needs to go to. The values of a corresponding key are tensors that are fed through the corresponding NN. My issue arises when trying to send the inputs to the device (cuda, specifically) as the .to method only works on tensors. Is there a way I can get around this? Can I simply feed the inputs to the model (output=model(inputs)) and have the model, once it reads the dictionary values, send the tensor values to device? Or does that not work? Thanks!