Solved by ptrblck in post #2 
              
              
                You could pass the parameters together with: 
params = list(model_in.parameters()) + list(model_RNN.parameters()) + list(model_out.parameters())
optimizer = optim.SGD(params, lr=learning_rate)