I\'m trying to implement a basic, binary Hopfield Network in TensorFlow 0.9. Unfortunately I\'m having a very hard time getting the activation function working. I\'m looking
a bit late, but if anyone needs it, I used this definition
def binary_activation(x): cond = tf.less(x, tf.zeros(tf.shape(x))) out = tf.where(cond, tf.zeros(tf.shape(x)), tf.ones(tf.shape(x))) return out
with x being a tensor