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

TypeError: broadcast_to requires ndarray or scalar arguments, got <class 'list'> at position 0. #32

Open
ankitatiisc opened this issue Jul 9, 2022 · 1 comment

Comments

@ankitatiisc
Copy link

Hi authors
I am getting this error while running train.py script. I have not made any changes to the code.
If I may ask, what was your build setup and configuration ? Also, is this code specific only for a jax version or does it have a forward compatibility with new version of jax. ?

@dctisdale
Copy link

Modifying: https://github.com/google/hypernerf/blob/main/hypernerf/model_utils.py#L114

From:

jnp.broadcast_to([last_sample_z], z_vals[..., :1].shape)

To:

import numpy as np
...
jnp.broadcast_to(np.asarray([last_sample_z]), z_vals[..., :1].shape)

Fixed the problem for me. (jax version fixed to jax==0.2.20 jaxlib==0.1.71)

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