Skip to content
Snippets Groups Projects
Commit e3a110f0 authored by Franck Dary's avatar Franck Dary
Browse files

Corrected bug where system wanted to back at each end of sentence

parent 24e86989
Branches
No related tags found
No related merge requests found
......@@ -254,9 +254,9 @@ def trainModelRl(debug, networkName, modelDir, filename, nbIter, batchSize, devF
reward = torch.FloatTensor([reward_]).to(getDevice())
newState = None
toState = strategy[action.name][1] if action.name in strategy else -1
if appliable :
applyTransition(strategy, sentence, action, reward_)
toState = sentence.state
newState = policy_net.extractFeatures(dicts, sentence).to(getDevice())
else:
count+=1
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment