I tried manually creating replicas.
replicas = t.nn.parallel.replicate(rvae (my model), device_ids)
inputs = t.nn.parallel.scatter(( dropout, encoder_word_input, encoder_character_input, 
decoder_word_input, decoder_character_input,
None), device_ids)
replicas = replicas[:len(inputs)]
outputs = t.nn.parallel.parallel_apply(replicas, inputs)
out = t.nn.parallel.gather(outputs, output_device)
But, I am getting error
RuntimeError: torch/csrc/autograd/variable.cpp:115: get_grad_fn: Assertion output_nr == 0 failed.
This happens at my LSTM part of my code