Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Noise added to predicted action during BC #25

Open
elicassion opened this issue May 19, 2024 · 0 comments
Open

Noise added to predicted action during BC #25

elicassion opened this issue May 19, 2024 · 0 comments

Comments

@elicassion
Copy link

Hi,

In your code, it seems that you didn't remove noise added to your BatchNormMLP policy output. Is it intended or a bug? I'm confused since it's uncommon to have noise for BC policies.

https://github.com/aravindr93/mjrl/blob/83d35df95eb64274c5e93bb32a0a4e2f6576638a/mjrl/policies/gaussian_mlp.py#L90-L97

def get_action(self, observation):
        o = np.float32(observation.reshape(1, -1))
        self.obs_var.data = torch.from_numpy(o)
        mean = self.model(self.obs_var).data.numpy().ravel()
        noise = np.exp(self.log_std_val) * np.random.randn(self.m)
        action = mean + noise
        return [action, {'mean': mean, 'log_std': self.log_std_val, 'evaluation': mean}]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant