Skip to content

mcoric96/Learning-Gaussian-distributions-in-TensorFlow

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

39 Commits
 
 
 
 
 
 

Repository files navigation

Learning-Gaussian-distributions-in-TensorFlow

Template TensorFlow code for feed-forward neural networks - learning Gaussian distributions.

Model architecture illustration:

gaussian_model_architecture_illustration

  • Input values: vector of numbers x .
  • Output values: μ , σ (parameters of Gaussian distrbution conditioned on input x ).
  • Loss function: standard negative log-likelihood of target value y under model output distribution: log p ( y ; μ , σ ) , where μ , σ = f ( x ) and f is neural network model.

For dataset $X = \{x_1, x_2, ..., x_n\}$ and target values $Y = \{y_1, y_2, ..., y_3\}$ loss function negative log-likelihood is defined as:

L ( θ ; X ) = 1 n i = 1 n log p ( y i ; μ i , σ i )

where $\mu_i$ and $\sigma_i$ are model outputs for $x_i$, $\theta$ are model parameters and $p$ is probability density function defined with model outputs $\mu_i$ and $\sigma_i$.



Model architecture:

  • feed-forward neural network (model can be extended for recurrent architectures),
  • base layers learn joint representations of inputs,
  • parameter layers ( μ - layer and σ - layer) learn specific representations important for each output parameter,
  • alternative for regression models with single numerical output,
  • μ - layer output activation function: can be any function, linear or any other that restricts output range,
  • σ - layer output activation function: should be function with only positive value outputs, like softplus.



Model output σ represents aleatoric model uncertainty (illustration example below).

github_aleatoric_uncertainty

About

Template TensorFlow code for feed-forward neural networks - learning Gaussian distributions

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages