karpathy / neuraltalk

NeuralTalk is a Python+numpy project for learning Multimodal Recurrent Neural Networks that describe images with sentences.
5.4k stars 1.32k forks source link

TypeError: amax() got an unexpected keyword argument 'keepdims' #3

Closed bluekite2000 closed 9 years ago

bluekite2000 commented 9 years ago

I ran driver.py and received an error as above. Am I missing something?

karpathy commented 9 years ago

Hi, yes you're missing a requirement of "modern numpy version". Upgrade your numpy to more recent version and it will work fine.

Thanks for bringing it up, I should edit the Readme file to mention this.

webeng commented 9 years ago

I had the same issue and I thought I was using the most recent version of numpy (1.9.1) that I installed via pip. However, the system was using an old version (1.6.1) not installed via pip. I found the version that the script was using by printing "print numpy.version in the script.

I used 'python -c 'import os,numpy;print(numpy.file)' to find the version that the system was using. I deleted that version and now the system uses the version that I installed via pip.

I found the solution here: http://stackoverflow.com/questions/16391335/using-old-version-of-numpy-even-with-a-newer-version-installed

I hope it helps somebody else.