From a3f9f3821f9b0f6810aa89db8edaef50da2c9953 Mon Sep 17 00:00:00 2001 From: Pranjal Tandon Date: Sat, 1 Sep 2018 13:22:57 +0530 Subject: [PATCH] Update model.py --- model.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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]