Commit 9d9c2bed authored by Fabian Krautgasser's avatar Fabian Krautgasser

switched action.data[0] to action.item()

parent 790403d1
......@@ -165,7 +165,7 @@ def select_action(*, model, agent, state) -> float:
if train:
agent.memory.Actions.append(SavedAction(cat_dist.log_prob(action),
state_value))
return action.data[0] # just output a number and not additionally the type
return action.item() # just output a number and not additionally the type
# defining what to do after the episode finished.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment