I want to write a custom activation function with keras.backend for last dense of LSTM like this:
def customactivation(x):
if x <= 0.5:
return 0
else :
return 1
model.add(Dense(1, activation=customactivation))
what should I do?