How does the LM used to update model parameter?

i follow the chain of the code decode_with_lm,and want to know how the language model used to update the model weight.But i only see the code optimizer.compute_gradients(avg_loss),in other words,it seems that loss used to update the model weight.so my question is whether is LM used to update model parameters per epoch? which one is right below?

  1. LM that base on the output of the network is used to train model and update the model parameter?

  2. LM change the output of the network and then show the most probable result to us according to the statistical text corpus?

if i want to add LM to my own model ,how can i do it?
Thank you in advance!!!

1 Like

It doesn’t, option 2 is what’s done.

1 Like

Got it!Thank you :grinning: