tf.contrib.kfac.loss_functions.MultiBernoulliNegativeLogProbLoss

Class MultiBernoulliNegativeLogProbLoss

Inherits From: DistributionNegativeLogProbLoss, NaturalParamsNegativeLogProbLoss

Defined in tensorflow/contrib/kfac/python/ops/loss_functions.py.

Neg log prob loss for multiple Bernoulli distributions param'd by logits.

Represents N independent Bernoulli distributions where N = len(logits). Its Fisher Information matrix is given by,

F = diag(p * (1-p)) p = sigmoid(logits)

As F is diagonal with positive entries, its factor B is,

B = diag(sqrt(p * (1-p)))

Properties

dist

fisher_factor_inner_shape

fisher_factor_inner_static_shape

hessian_factor_inner_shape

hessian_factor_inner_static_shape

inputs

params

targets

Methods

__init__

__init__(
    logits,
    targets=None,
    seed=None
)

evaluate

evaluate()

Evaluate the loss function on the targets.

evaluate_on_sample

evaluate_on_sample(seed=None)

Evaluates the log probability on a random sample.

Args:

  • seed: int or None. Random seed for this draw from the distribution.

Returns:

Log probability of sampled targets, summed across examples.

multiply_fisher

multiply_fisher(vector)

multiply_fisher_factor

multiply_fisher_factor(vector)

multiply_fisher_factor_replicated_one_hot

multiply_fisher_factor_replicated_one_hot(index)

multiply_fisher_factor_transpose

multiply_fisher_factor_transpose(vector)

multiply_hessian

multiply_hessian(vector)

multiply_hessian_factor

multiply_hessian_factor(vector)

multiply_hessian_factor_replicated_one_hot

multiply_hessian_factor_replicated_one_hot(index)

multiply_hessian_factor_transpose

multiply_hessian_factor_transpose(vector)

sample

sample(seed)