# tf.contrib.kfac.loss_functions.NormalMeanVarianceNegativeLogProbLoss

## Class NormalMeanVarianceNegativeLogProbLoss

Inherits From: DistributionNegativeLogProbLoss

Negative log prob loss for a normal distribution with mean and variance.

This class parameterizes a multivariate normal distribution with n independent dimensions. Unlike NormalMeanNegativeLogProbLoss, this class does not assume the variance is held constant. The Fisher Information for n = 1 is given by,

F = [[1 / variance, 0], [ 0, 0.5 / variance^2]]

where the parameters of the distribution are concatenated into a single vector as [mean, variance]. For n > 1, the mean parameter vector is concatenated with the variance parameter vector.

See https://www.ii.pwr.edu.pl/~tomczak/PDF/[JMT]Fisher_inf.pdf for derivation.

## Methods

### __init__

__init__(
mean,
variance,
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(vecs)


### multiply_fisher_factor

multiply_fisher_factor(vecs)


### multiply_fisher_factor_replicated_one_hot

multiply_fisher_factor_replicated_one_hot(index)


### multiply_fisher_factor_transpose

multiply_fisher_factor_transpose(vecs)


### 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)