Skip to content

Commit a7a6871

Browse files
committed
fix
1 parent cb5aea7 commit a7a6871

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

ppo_continuous_multiprocess.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -151,9 +151,8 @@ def get_action(self, state, deterministic=False):
151151
state = torch.FloatTensor(state).unsqueeze(0).to(device)
152152
mean, log_std = self.forward(state)
153153
std = log_std.exp()
154-
normal = Normal(0, 1)
155-
z = normal.sample()
156-
action = mean+std*z
154+
normal = Normal(mean, std)
155+
action = normal.sample()
157156
action = torch.clamp(action, -self.action_range, self.action_range)
158157
return action.squeeze(0)
159158

0 commit comments

Comments
 (0)