AttributeError: module ‘keras.optimizers’ has no attribute ‘Adam’

I am getting an error when running the “Keras Network Learner” on KNIME. It gives the following error:

ERROR Keras Network Learner 6:16 module ‘keras.optimizers’ has no attribute ‘Adam’
Traceback (most recent call last):
File “”, line 7, in
AttributeError: module ‘keras.optimizers’ has no attribute ‘Adam’

Will appreciate if anyone can help me fix this. I am really not sure which python file I should be looking into, to fix the issue with importing the modules for the training process, as that is what is hinted by the error above. Thanks in advance!

I guess Adam is a class not an Attribute so you need to call it (instanciate it)
sth like
If you use KNIME (no python script) you probably should share your work here to get help

1 Like

@akhtarameen as it happens I just have collected some example how to set up Keras and Tensor Flow 2 (for classification tasks) with the help of the Conda Environment propagation.

If you have a working Miniconda or Anaconda environment configured in KNIME you should be able to just use the propagation and get a working deep learning setup.

You would then have to carefully check and plan what you want to d with the setup and what architecture you want to use.

The setup in the KNIME preferences would look something like this. You can generate a deep learning environment here or try to let the Conda environment propagation do the job for you once you have a basic Miniconda running (regardless of the Python version).

The same thing should also work with Tensor Flow:

If you just want (some) Deep Learning without configurations and Python you can just force AutoML to do the job :slight_smile:


@mlauber71 ,
Have you experienced any benefits in using KNIME instead of scripting the python code directly?

@Daniel_Weikert I think like it is so often the case KNIME provides the platform and the workflow. You can do a lot of things just using Python but KNIME makes it easier to integrate that with other functions.

1 Like

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.