LostTech.TensorFlow : API Documentation

Type KLDivergence

Namespace tensorflow.keras.losses

Parent LossFunctionWrapper

Interfaces IKLDivergence

Computes Kullback-Leibler divergence loss between `y_true` and `y_pred`.

`loss = y_true * log(y_true / y_pred)`

See: https://en.wikipedia.org/wiki/Kullback%E2%80%93Leibler_divergence

Usage: Usage with the `compile` API:
Show Example
k = tf.keras.losses.KLDivergence()
            loss = k([.4,.9,.2], [.5,.8,.12])
            print('Loss: ', loss.numpy())  # Loss: 0.11891246 

Properties

Public properties

object fn get; set;

string name get; set;

object PythonObject get;

string reduction get; set;