Is there a way to load the initiated hidden states to the device with the model?

Hi! I used to use “model.to(device_gpu)” to train my network. However, when the RNN is involved, this couldn’t load the initiated hidden states to the GPU. In that case, I needed to additionally load the initiated hidden states to the GPU inside the model:
hidden = torch.zeros(num_layers, batch_size, hidden_size).to(device_gpu)
Is there a way to directly load the hidden states to the