Deep-reinforcement-learning-with-pytorch
Deep-reinforcement-learning-with-pytorch copied to clipboard
SAC_Bug
in sac.py
s = torch.tensor([t.s for t in self.replay_buffer]).float().to(device)
Traceback (most recent call last):
File "D:\PycharmProject\Deep-reinforcement-learning-with-pytorch-master\Char09 SAC\SAC.py", line 307, in
How to deal with it?
V_loss = self.value_criterion(excepted_value, next_value.detach()).mean() # J_V
# Dual Q net
Q1_loss = self.Q1_criterion(excepted_Q1.float(), next_q_value.detach()**.float()**).mean() # J_Q
# Q1_loss = Q1_loss.folat()
Q2_loss = self.Q2_criterion(excepted_Q2.float(), next_q_value.detach().float()).mean()
# Q2_loss = Q2_loss.float()
pi_loss = (log_prob.float() - excepted_new_Q.float()).mean() # according to original paper
1、change all the dtype to float 2、then i met the next bug,the picture is what i had done