'Theoretical bound of the coded length given a probability distribution.
Args:
c: The binary codes. Belong to {0, 1}.
p: The probability of: P(code==+1)
Returns:
The average code length.
Note: the average code length can be greater than 1 bit (e.g. when
encoding the least likely symbol).'

def _Apply(self, c, p):

    entropy = ((((1.0 - c) * tf.log((1.0 - p))) + (c * tf.log(p))) / (- math.log(2)))
    entropy = tf.reduce_mean(entropy)
    return entropy
