Skip to content
Advertisement

AttributeError: module ‘keras.api._v2.keras.utils’ has no attribute ‘Sequential’ i have just started Neural network so help would be appriciated

JavaScript
JavaScript

Advertisement

Answer

You should be using tf.keras.Sequential() or tf.keras.models.Sequential(). Also, you need to define a valid loss function. Here is a working example:

JavaScript
User contributions licensed under: CC BY-SA
10 People found this is helpful
Advertisement