Closed i1Cps closed 8 months ago
In dqn_agent.py, shouldnt the loss function be:
loss = self.q_eval.loss(q_pred, q_target).to(self.q_eval.device)
Instead of:
loss = self.q_eval.loss(q_target, q_pred).to(self.q_eval.device)
Pytorch documentation for reference
"The magnitude of the loss is always the same regardless of the order." "The gradients of the loss function, with respect to the weights of the network, for a constant (i.e. the target) is always zero."
In dqn_agent.py, shouldnt the loss function be:
Instead of:
Pytorch documentation for reference