I am getting an import error when trying to import the Keras module Nadam:
>>> from keras.optimizers import Nadam
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ImportError: cannot import name Nadam
I can import and use SGD, Adam, etc, just not this optimizer. Any help appreciated.
I installed Keras using:
git clone https://github.com/fchollet/keras.git
sudo python2.7 setup.py install
I have just found that, if I try to import it using the shell immediately after installation, the Nadam import works. But Nadam won't import in my script. So it's a path issue?
sys.path
andsys.modules
(see where the modules are loaded from) - in the "shell" and in your script. – Valuation