View source on GitHub |
Computes 2**x - 1
element-wise for each label.
tfr.keras.utils.pow_minus_1(
label: tfr.keras.model.TensorLike
) -> tf.Tensor
Can be used to define gain_fn
for tfr.keras.metrics.NDCGMetric
.
Args | |
---|---|
label
|
A Tensor or anything that can be converted to a tensor using
tf.convert_to_tensor .
|
Returns | |
---|---|
A Tensor that has each input element transformed as x to 2**x - 1 .
|