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
Just for the record, one can get the sign function via tf.sign
. It outputs a float or integer (depending on the input) indicating the sign with -1
or 1
. However, note that tf.sign(0) == 0
!
For a hard limiting activation function, binary threshold activation function, Heaviside step function, see the other answer.