I'm really new to Keras, so forgive me if my request is a little stupid. I installed Keras on my system using the default methods and it works fine. I want to add a new optimizer in Keras so that I can easily specify "optimizer = mynewone" in the model.compile function. How can I change the optimizer.py code in Keras and make sure that this change is reflected in my Keras environment. Here is what I tried:
Suppose I change the optimizer name from rmsprop to rmsprops in the code, I get the following error:
model.compile(loss='binary_crossentropy', optimizer='rmsprops', metrics= ['accuracy']) Traceback (most recent call last): File "<ipython-input-33-40773d534448>", line 1, in <module> model.compile(loss='binary_crossentropy', optimizer='rmsprops', metrics=['accuracy']) File "/home/kiran/anaconda/lib/python3.5/site-packages/keras/models.py", line 589, in compile **kwargs) File "/home/kiran/anaconda/lib/python3.5/site-packages/keras/engine/training.py", line 469, in compile self.optimizer = optimizers.get(optimizer) File "/home/kiran/anaconda/lib/python3.5/site-packages/keras/optimizers.py", line 614, in get
Then, when I click on optimizers.py, I get the code developed by Keras in my environment. After that, in the code, I replaced all the keywords "rmsprop" with "rmsprops" and saved the file. So I thought I should update optimizer.py on my system. But when I go back to the original file and run the model.compile file, it gives the same error.
Any help would be really appreciated. Thanks in advance.
source share