Skip to main content

Quick access to uncertainty and confidence of Keras networks.

Project description


Documentation Status PyPI

Uncertainty wizard is a plugin on top of tensorflow.keras, allowing to easily and efficiently create uncertainty-aware deep neural networks:

  • Plain Keras Syntax: Use the layers and APIs you know and love.
  • Conversion from keras: Convert existing keras models into uncertainty aware models.
  • Smart Randomness: Use the same model for point predictions and sampling based inference.
  • Fast ensembles: Train and evaluate deep ensembles lazily loaded and using parallel processing.
  • Super easy setup: Pip installable. Only tensorflow as dependency.


It's as easy as pip install uncertainty-wizard


  • tensorflow >= 2.3.0
  • python 3.6* / 3.7 / 3.8

Note that tensorflow 2.4 has just been released. We will test and create compatibility with uncertainty wizard in the next couple of weeks. Until then, please stick to tensorflow 2.3.x.

*python 3.6 requires to pip install dataclasses


Our documentation is deployed to:

Note that we have a 100% docstring coverage on public method and classes. Hence, your IDE will be able to provide you with a good amount of docs out of the box.


A set of small and easy examples, perfect to get started can be found in the user guide for our models and the user guide for our quantifiers

Larger and examples are also provided - and you can run them in colab right away. You can find them here: List of jupyter examples

Authors and Paper

uncertainty-wizard was developed by Michael Weiss and Paolo Tonella at USI (Lugano, Switzerland). An early version was first presented in the following paper (preprint can be found here):

Fail-Safe Execution of Deep Learning based Systems through Uncertainty Monitoring (expand for BibTex)
  title={Fail-Safe Execution of Deep Learning based Systems through Uncertainty Monitoring},  
  author={Weiss, Michael and Tonella, Paolo},  
  booktitle={2021 IEEE 14th International Conference on Software Testing,   
    Validation and Verification (ICST)},  

We are also currently writing a technical tool paper, describing design choices and challenges. We are happy to share a preprint upon request.


Issues and PRs are welcome! Before investing a lot of time for a PR, please open an issue first, describing your contribution. This way, we can make sure that the contribution fits well into this repository.

Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

uncertainty-wizard-0.1.0.tar.gz (35.6 kB view hashes)

Uploaded Source

Built Distribution

uncertainty_wizard-0.1.0-py3-none-any.whl (46.4 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page