Skip to content

Troubleshooting

Name edited this page Oct 5, 2018 · 9 revisions

Getting the subprocess32 error when installing

This means that a dependency used by matplotlib called subprocess32 is not building, which is generally associated with python 2. The way to overcome this issue is by first installing an older version of matplotlib (this is ok):

pip install matplotlib==1.5.3

Getting a warning on wrong numpy version for tensorflow

This might happen on some older systems with python 2. Overcome by first installing an older numpy version:

pip install numpy==1.14.5

When using lr_normalizer get TypeError: 'str' object is not callable

This error comes as a result of listing optimizers as string values as opposed to the actual object name in the params dictionary.

When not using lr_normalizer get ValueError: Could not interpret optimizer identifier: <class 'keras.optimizers.Adam'>

This is the reverse of the above; when lr_normalizer is not used, string values for optimizers should be used in the params dictionary.

When using a string value for activation and get TypeError: unsupported operand type(s) for +: 'int' and 'numpy.str_'

For example if the activation is 'relu' and 'elu', then this can be resolved simply by:

from keras.activations import relu, elu

Then instead of using a string value in the params dictionary, use the actual object (e.g. relu).

NOTE: this is a very common case to get it wrong and the error messages do not indicate that anything is wrong with activation. In fact the error messages will say everything else as you try to hopelessly troubleshoot this. This is an important one to remember friends!

TypeError: 'numpy.str_' object cannot be interpreted as an integer

Read above. It might be that there are other varieties of this as well, but the solution is always simple. Input actual activation object names (as opposed to strings) in the param dictionary.

When applying hidden layers, you get the error KeyError: 'first_neuron'

The parameter for the first layer neuron value needs to be called 'first_neuron'

When applying hidden layers, you get KeyError: 'hidden_layers' or KeyError: 'dropout'

When ever hidden_layers is applied in the model, hidden_layers and dropout parameters need to be included in the params dictionary

AttributeError: 'History' object has no attribute 'keys'

This happens when the input model has:

return model, out

You fix this by using the right order for the objects:

return out, model

Kernel dies on Windows

This is most likely due to the fact that clear_tf_session is True by default. It needs to be False on windows.