Python Keras: An layer output exactly the same thing as input
For a simpler operation like identity, you can just use a Lambda layer like:
model.add(Lambda(lambda x: x))
This will return an output exactly the same as your input.
Actually, default call()
implementation in Layer
is identity, so you can just use:
model.add(Layer())