For the custom activation function that changes to scores below, I want to replace the values with the activated_x with less than threshold=0.5 to be 0.
How can I modify?
def ScoreActivationFromSigmoid(x, target_min=1, target_max=9) :
activated_x = K.sigmoid(x)
#threshold = 0.5
#binary_activated_x = activated_x > threshold
#activated_x = K.cast_to_floatx(binary_activated_x)
score = activated_x * (target_max - target_min) + target_min
return score
with the commented out source above, it is working as an activation function but when I uncomment them, they will not work