How can I clip the values returned by the Lambda
layer?
I tried using this:
from keras.backend.tensorflow_backend import clip
from keras.layers.core import Lambda
...
model.add(Dense(1))
model.add(Activation('linear'))
model.add(Lambda(lambda x: clip(x, min_value=200, max_value=1000)))
But it does not matter where I put my Lambda+clip, it does not affect anything?
model.summary()
? And - by clip doesn't affecting anything you mean that values are not clipped, yes? – Philomena