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

Date type problem #1

Open
Alchemist77 opened this issue Jan 25, 2021 · 0 comments
Open

Date type problem #1

Alchemist77 opened this issue Jan 25, 2021 · 0 comments

Comments

@Alchemist77
Copy link

Alchemist77 commented Jan 25, 2021

Thank you for sharing this code.

When I run this code, I got the error

In DQNAgentWithHER.py, Line 106
q_pred = self.q_eval.forward(concat_state_goal)[batches, action]

IndexError: tensors used as indices must be long, byte or bool tensors

I already checked dtype and shape then I got it

    print(concat_state_goal.dtype)            torch.float32
    print(batches.dtype)                             int64
    print(action.dtype)                                torch.float32

    print(concat_state_goal.shape)           torch.Size([64, 16])
    print(batches.shape)                            (64,)
    print(action.shape)                               torch.Size([64, 8])

Could you provide me which is the problem? (what is the difference between your output and mine..)

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