How to Solve NameError: name 'KerasClassifier' is not defined -- keras

Solution: Import the 'KerasClassifier' module

To Solve the error, add the following line to the top of your code.

from keras.wrappers.scikit_learn import KerasClassifier

 

For more information:
Python keras KerasClassifier