@deprecated('The function log_normalize is deprecated in 0.18 and will be removed in 0.20.')
def log_normalize(v, axis=0):
 v = np.rollaxis(v, axis)
 v = v.copy()
 v -= v.max(axis=0)
 out = logsumexp(v)
 v = np.exp((v - out))
 v += np.finfo(np.float32).eps
 v /= np.sum(v, axis=0)
 return np.swapaxes(v, 0, axis)

@ deprecated ( 'The function log_normalize is deprecated in 0.18 and will be removed in 0.20.' ) def log_normalize ( v , axis = 0 ) : v = np . rollaxis ( v , axis ) v = v . copy ( ) v -= v . max ( axis = 0 ) out = logsumexp ( v ) v = np . exp ( ( v - out ) ) v += np . finfo ( np . float32 ) . eps v /= np . sum ( v , axis = 0 ) return np . swapaxes ( v , 0 , axis )
normalized probabilities from unnormalized log-probabilites .