Skip to content

A toolkit for computing some probabilistic moments of deep neural networks.

License

Notifications You must be signed in to change notification settings

adelbibi/network_moments

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Network Moments

Network Moments is a toolkit that enables computing some probabilistic moments of deep neural networks given a specific input distribution. The current implemetation allows you to compute the first and second Gaussian network moments (GNM) of affine-ReLU-affine networks i.e., the output mean and variance subject to Gaussian input.

theorems

The main backend framework is PyTorch but also TensorFlow and MatLab are supported.

Requirements

Network Moments was developed and tested with the following:

You need Jupyter to run tightness. It is recommended that you have Jupyter Lab.

Installation

After installing the requirements, to install or update this package run the following in the terminal:

pip install -U git+https://github.com/ModarTensai/network_moments.git

Now go to the tightness notebook to see how to use this tool with the default backend framework.

To uninstall the package:

pip uninstall network_moments

Usage

To import the PyTorch sub-package:

import network_moments.torch as nm

The basic usage is demonstrated in the tightness notebook.

To import the TensorFlow sub-package:

import network_moments.tensorflow as nm

Please, refer to tensorflow tests notebook for examples to compare PyTorch and TensorFlow implementations.

Cite

This is the official implementation of the method described in this paper (checkout the poster):

@InProceedings{Bibi_2018_CVPR,
    author = {Bibi, Adel and Alfadly, Modar and Ghanem, Bernard},
    title = {Analytic Expressions for Probabilistic Moments of PL-DNN With Gaussian Input},
    booktitle = {The IEEE Conference on Computer Vision and Pattern Recognition (CVPR)},
    month = {June},
    year = {2018}
}

License

MIT

Author

Modar M. Alfadly

Contributors

I would gladly accept any pull request that improves any aspect of this repository.

About

A toolkit for computing some probabilistic moments of deep neural networks.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 66.8%
  • Jupyter Notebook 25.1%
  • MATLAB 8.1%