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

ValueError: could not broadcast input array from shape (2,15) into shape (2,16) #107

Open
liusui652 opened this issue Jan 14, 2022 · 3 comments

Comments

@liusui652
Copy link

image
When I ran train.py, this bug appeared. Later, I adjusted the torch version and no longer reported the error, but it appeared again when I ran evaluate_model.py. I don't know what caused it?

@eunjic
Copy link

eunjic commented May 12, 2022

@liusui652 I'm having same problem when I run train.py. What torch version did you adjusted?

@lsch0lz
Copy link

lsch0lz commented Dec 25, 2022

Hi @liusui652 ! Did you yolved the problem? I'm currently facing the same issue

@Nadzi77
Copy link

Nadzi77 commented Apr 20, 2023

It is because some person is not in all 16 positions (8 observed, 8 predicted) - in your case, "(2,15)" means there are 15 positions of some person in dataset instead of 16. I had the same issue so I added these lines in trajectory.py under line curr_ped_seq = np.transpose(curr_ped_seq[:, 2:]):

if curr_ped_seq.shape != (2,16): continue

(in case you are predicting 12 positions, use (2,20) )

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

4 participants