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

stacked_imgs are only available up to 2 #29

Open
taewookim0812 opened this issue Jun 9, 2022 · 1 comment
Open

stacked_imgs are only available up to 2 #29

taewookim0812 opened this issue Jun 9, 2022 · 1 comment

Comments

@taewookim0812
Copy link

taewookim0812 commented Jun 9, 2022

Hi!
I'm developing my learning framework based on SPiRL, using my custom dataset.
In skill learning phase, when I set "n_input_frames=4", I got the following error message at the _get_seq_enc() of ImageClSPiRLMdl:

Code:
stacked_imgs = torch.cat([inputs.images[:, t:t+inputs.actions.shape[1]]
for t in range(self._hp.n_input_frames)], dim=2)

Error Message:
RuntimeError: Sizes of tensors must match except in dimension 2. Got 13 and 12 in dimension 1 (The offending index is 2)

In this case, the shape of each element is as following
'actions'={Tensor: (128, 13, 7)}
'pad_mask'={Tensor: (128, 14)}
'states'={Tensor: (128, 14, 34)}
'images'={Tensor: (128, 14, 3, 128, 128)}
'observations'={Tensor: (128, 13, 7)}

It works well if the n_input_frames is less than 3, but occurs error if the value is greater than 2.
I think the shape of action should be (128, 11, 7) to run the code line correctly.

How can I solve this problem?

@kpertsch
Copy link
Collaborator

kpertsch commented Dec 5, 2022

Hey sorry,
I missed this issue when you raised it -- is this question still relevant?

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

2 participants