Skip to content

Commit 30c0c6f

Browse files
committed
Implement final eval
1 parent 7731f63 commit 30c0c6f

File tree

3 files changed

+7095
-0
lines changed

3 files changed

+7095
-0
lines changed

diploma_thesis/agents/utils/rl/dqn.py

+1
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,7 @@ def compute_loss():
5252
actions = self.__get_action_values__(model, batch.state, batch.action)
5353

5454
weight = torch.tensor(info['_weight']) if '_weight' in info.keys() else torch.ones_like(q_values)
55+
weight = weight.to(actions.device)
5556

5657
print(weight, info)
5758

0 commit comments

Comments
 (0)