1

second_fashion_model.add(LeakyReLU(alpha=0.05))

throws error as:

The added layer must be an instance of class Layer. Found:

jay
  • 65
  • 1
  • 10

1 Answers1

2

Make sure that:

  1. You are using the latest version of Keras
  2. That you are using Keras layers and not Tensorflow.keras layers (per here)

Example:

from keras.layers import LeakyReLU
model = Sequential()
model.add(Dense(90))
model.add(LeakyReLU(alpha=0.03))
DSH
  • 1,038
  • 16
  • 27