Assumed Density Filtering (ADF) Probabilistic Networks
keras-adf provides implementations for probabilistic Tensorflow/Keras neural network layers, which are based on assumed density filtering. Assumed density filtering (ADF) is a general concept from Bayesian inference, but in the case of feed-forward neural networks that we consider here it is a way to approximately propagate a random distribution through the neural network.
The layers in this package have the same names and arguments as their corresponding Keras version. We use Gaussian distributions for our ADF approximations, which are described by their means and (co-)variances. So unlike the standard Keras layers, each keras-adf layer takes two inputs and produces two outputs (one for the means and one for the (co-)variances).
keras-adf layers can be used exactly like the corresponding Keras layers within a Keras model. However, as mentioned above, ADF layers take two inputs and produce two outputs instead of one, so it is not possible to simply mix ADF and standard layers within the same model.
from tensorflow.keras import Input, Model from kerasadf.layers import Dense in_mean = Input((10,)) in_var = Input((10,)) out_mean, out_var = Dense(10, activation="relu")([in_mean, in_var]) model = Model([in_mean, in_var], [out_mean, out_var])
If you’d like to contribute to keras-adf you’re most welcome. We have written a short guide to help you get you started!
Additional information on the algorithmic aspects of keras-adf can be found in the following works:
- Jochen Gast, Stefan Roth, “Lightweight Probabilistic Deep Networks”, 2018
- Jan Macdonald, Stephan Wäldchen, Sascha Hauch, Gitta Kutyniok, “A Rate-Distortion Framework for Explaining Neural Network Decisions”, 2019
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
|Filename, size||File type||Python version||Upload date||Hashes|
|Filename, size keras_adf-19.1.0-py2.py3-none-any.whl (18.2 kB)||File type Wheel||Python version py2.py3||Upload date||Hashes View hashes|
|Filename, size keras-adf-19.1.0.tar.gz (38.1 kB)||File type Source||Python version None||Upload date||Hashes View hashes|
Hashes for keras_adf-19.1.0-py2.py3-none-any.whl