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

np.argmax unexpected keyword argument 'keepdims' in mobileNerf #132

Open
lishulincug opened this issue Oct 12, 2022 · 2 comments
Open

np.argmax unexpected keyword argument 'keepdims' in mobileNerf #132

lishulincug opened this issue Oct 12, 2022 · 2 comments

Comments

@lishulincug
Copy link

I run python stage3.py , but get this error:

ind = np.argmax(weights_b, axis=-1, keepdims=True) #[N,4,1]
TypeError: argmax() got an unexpected keyword argument 'keep_dims'

image

@Bananamilk452
Copy link

upgrade your python version to python==3.8.

np.argmax keepdims is new feature from numpy 1.22.
numpy 1.22 has dropped support of python 3.7. (numpy/numpy#19665)

BUT conda's python version in readme is 3.6. so you have to version up your python

@CCOSerika
Copy link

Replace it with

ind_t = np.argmax(weights_b, axis=-1) 
ind = np.expand_dims(ind_t, axis=-1) #[N,4,1]

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

3 participants