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

some distribution creation doesn' t do anything #166

Closed
HiddeLekanne opened this issue Dec 2, 2023 · 2 comments · Fixed by #168
Closed

some distribution creation doesn' t do anything #166

HiddeLekanne opened this issue Dec 2, 2023 · 2 comments · Fixed by #168

Comments

@HiddeLekanne
Copy link

Lines like:

predicted_values = Independent(
        Normal(critic(imagined_trajectories), 1, validate_args=validate_args),
        1,
        validate_args=validate_args,
    ).mean

and

    predicted_rewards = Independent(
        Normal(world_model.reward_model(imagined_trajectories), 1, validate_args=validate_args),
        1,
        validate_args=validate_args,
    ).mean

Don't do anything.

It's because you're not sampling from the distribution, your simply taking the mean, which is what you started with anyways. You can confirm it by running a training session with and without the whole distribution creation and see that the model learns exactly the same thing.

Lines are from DreamerV1

@HiddeLekanne
Copy link
Author

same should be for the .mode versions in DreamerV2, because for a normal distribution the mode equals the mean.

@belerico
Copy link
Member

belerico commented Dec 4, 2023

Hi @HiddeLekanne, yeah you're right: this should give us the same trained agent. I will try it asap

@michele-milesi michele-milesi linked a pull request Dec 12, 2023 that will close this issue
4 tasks
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

Successfully merging a pull request may close this issue.

2 participants