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

Cannot run PointMazeLeft-v0 #4

Open
sff1019 opened this issue Feb 9, 2021 · 0 comments
Open

Cannot run PointMazeLeft-v0 #4

sff1019 opened this issue Feb 9, 2021 · 0 comments

Comments

@sff1019
Copy link

sff1019 commented Feb 9, 2021

I've tried to run the codes with the following command:
python Train.py --seed 1 --env_name PointMazeLeft-v0 --policy_name SAC

However, I get a runtime error as follows:

Traceback (most recent call last):
  File "Train.py", line 523, in <module>
    main()
  File "Train.py", line 314, in main
    expert_state, expert_action)
  File "~/Off_Policy_Adversarial_Inverse_Reinforcement_Learning/Policies/Policy.py", line 201, in compute_pdf
    lprob = dist.log_prob(action).sum(-1, keepdim=True)
  File "~/lib/python3.7/site-packages/torch/distributions/normal.py", line 76, in log_prob
    return -((value - self.loc) ** 2) / (2 * var) - log_scale - math.log(math.sqrt(2 * math.pi))
RuntimeError: The size of tensor a (0) must match the size of tensor b (2) at non-singleton dimension 1

Could you check if the expert trajectories have all data needed? If I am correct, the trajectories seem to be missing 'next_states'.

Thank you

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