Thank you @ptrblck
I have 2 dictionary variables in my model and when I run DataParallel, it gives cuda mismatch error.
I thought this will resolve the issue. However on searching, I got to know that only register buffers and parameters are replicated by DataParallel to the corresponding GPU. Could you suggest any solution for that?