Fix a bug of Categorical DQN

This commit is contained in:
Shangtong Zhang committed 2018-03-12 20:37:12 -06:00
1 parent 3e47451ef6
commit 5b4ecd882e
4 files changed
+20 -13

No files matched your search

+1 -1
View File
@@ -99,5 +99,5 @@ class CategoricalNet(BasicNet):
pre_prob = self.fc_categorical(phi).view((-1, self.n_actions, self.n_atoms))
prob = F.softmax(pre_prob, dim=-1)
if to_numpy:
return pre_prob.cpu().data.numpy()
return prob.cpu().data.numpy()
return prob