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

Print reward in debug mode

parent 9c966953
Branches
No related tags found
No related merge requests found
...@@ -274,6 +274,9 @@ def trainModelRl(debug, networkName, modelDir, filename, nbIter, batchSize, devF ...@@ -274,6 +274,9 @@ def trainModelRl(debug, networkName, modelDir, filename, nbIter, batchSize, devF
reward_ = rewarding(appliable, sentence, action, missingLinks, rewardFunc) reward_ = rewarding(appliable, sentence, action, missingLinks, rewardFunc)
reward = torch.FloatTensor([reward_]).to(getDevice()) reward = torch.FloatTensor([reward_]).to(getDevice())
if debug :
print("Reward :", reward_, file=sys.stderr)
newState = None newState = None
toState = strategy[fromState][action.name][1] if action.name in strategy[fromState] else -1 toState = strategy[fromState][action.name][1] if action.name in strategy[fromState] else -1
if appliable : if appliable :
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment