neubig / nn4nlp-code

Code Samples from Neural Networks for NLP

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

question regarding bilstm-tagger.py

mehdimashayekhi opened this issue · comments

Hi, Thanks for sharing the source code. I learned a lot. But, I have a quick question regarding "Reinforce score", my question is why the Reinforce score is "Score*reward" as calculated here :

line 126 of bilstm-tagger.py

#then calculate the reinforce scores using reinforce
    reinforce_scores = [r_s*score for r_s, score in zip(rewards_over_baseline, scores)]```

Never mind I just understood the logic/math, thanks though