diff --git a/model.py b/model.py index 93a6a22..6e36c70 100644 --- a/model.py +++ b/model.py @@ -79,7 +79,7 @@ class GaussianPolicy(nn.Module): normal = Normal(mean, std) if reparam == True: - x_t = mean + std * torch.randn(1,6) + x_t = normal.rsample() # or mean + std * torch.randn(1,6) else: x_t = normal.sample() @@ -152,4 +152,4 @@ class GaussianMixturePolicy(nn.Module): action = torch.tanh(x_t) action = action.detach().cpu().numpy() - return action[0] \ No newline at end of file + return action[0]