Attend the Women in ML Symposium on December 7 Register now

tfr.keras.utils.log2_inverse

Stay organized with collections Save and categorize content based on your preferences.

Computes 1./log2(1+x) element-wise for each label.

Can be used to define rank_discount_fn for tfr.keras.metrics.NDCGMetric.

rank A Tensor or anything that can be converted to a tensor using tf.convert_to_tensor.

A Tensor that has each input element transformed as x to 1./log2(1+x).