Update model.py

This commit is contained in:
Pranjal Tandon
2018-09-01 13:22:57 +05:30
committed by GitHub
parent 2e53d5278f
commit a3f9f3821f
+2 -2
View File
@@ -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]
return action[0]