All Projects → RaulMurillo → deep-pensieve

RaulMurillo / deep-pensieve

Licence: Apache-2.0 license
A Deep Learning Framework for the Posit Number System

Programming Languages

python
139335 projects - #7 most used programming language
shell
77523 projects

Projects that are alternatives of or similar to deep-pensieve

float eq-rs
Compare IEEE floating point values for equality.
Stars: ✭ 34 (+78.95%)
Mutual labels:  floating-point
DoubleFloats.jl
math with more good bits
Stars: ✭ 102 (+436.84%)
Mutual labels:  floating-point
DecFP.jl
Julia IEEE decimal floating-point via the Intel decimal-float library
Stars: ✭ 49 (+157.89%)
Mutual labels:  floating-point
decimal
An arbitrary-precision decimal floating-point arithmetic package for Go
Stars: ✭ 28 (+47.37%)
Mutual labels:  floating-point
ndzip
A High-Throughput Parallel Lossless Compressor for Scientific Data
Stars: ✭ 19 (+0%)
Mutual labels:  floating-point
fpzip
Lossless compressor of multidimensional floating-point arrays
Stars: ✭ 58 (+205.26%)
Mutual labels:  floating-point
cppPosit
c++ posit implementation
Stars: ✭ 37 (+94.74%)
Mutual labels:  posit
shellmath
Yes, Virginia, you can do floating-point arithmetic in Bash!
Stars: ✭ 33 (+73.68%)
Mutual labels:  floating-point
fphdl
VHDL-2008 Support Library
Stars: ✭ 36 (+89.47%)
Mutual labels:  floating-point
Turbo-Transpose
Transpose: SIMD Integer+Floating Point Compression Filter
Stars: ✭ 50 (+163.16%)
Mutual labels:  floating-point
Guide-to-Swift-Numbers-Sample-Code
Xcode Playground Sample Code for the Flight School Guide to Swift Numbers
Stars: ✭ 92 (+384.21%)
Mutual labels:  floating-point
Drachennest
Different algorithms for converting binary to decimal floating-point numbers
Stars: ✭ 60 (+215.79%)
Mutual labels:  floating-point
Number Precision
🚀1K tiny & fast lib for doing addition, subtraction, multiplication and division operations precisely
Stars: ✭ 3,345 (+17505.26%)
Mutual labels:  floating-point
fpzip
Cython bindings for fpzip, a floating point image compression algorithm.
Stars: ✭ 24 (+26.32%)
Mutual labels:  floating-point
FpDebug
Dynamic Program Analysis based on Valgrind to find Floating-Point Accuracy Problems
Stars: ✭ 19 (+0%)
Mutual labels:  floating-point
FPChecker
A dynamic analysis tool to detect floating-point errors in HPC applications.
Stars: ✭ 26 (+36.84%)
Mutual labels:  floating-point
ChangePrecision.jl
macro to change the default floating-point precision in Julia code
Stars: ✭ 28 (+47.37%)
Mutual labels:  floating-point
floaxie
Floating point printing and parsing library based on Grisu2 and Krosh algorithms
Stars: ✭ 28 (+47.37%)
Mutual labels:  floating-point
herbie
Optimize floating-point expressions for accuracy
Stars: ✭ 614 (+3131.58%)
Mutual labels:  floating-point
verrou
floating-point errors checker
Stars: ✭ 39 (+105.26%)
Mutual labels:  floating-point

Deep PeNSieve

Documentation
Documentation
DOI

Deep PeNSieve is a framework to entirely performing both training and inference of DNNs employing the Posit Number System.

Deep PeNSieve img

Supported on

  • 64 bit machines
  • Only tested on Linux

Installation

Deep PeNSieve relies on other two libraires: TensorFlow and SoftPosit. TensorFlow framework needs to be modified to support posit data type via software emulation.

At least TensorFlow must be installed to run Deep PeNSieve. If need to use fused operations, install SoftPosit too. You can install them, for example, using pip. First install the prerequisites:

$ pip install numpy-posit
$ pip install requests

And then, the required libraries:

$ pip install https://s3-ap-southeast-1.amazonaws.com/posit-speedgo/tensorflow_posit-1.11.0.0.0.1.dev1-cp36-cp36m-linux_x86_64.whl
$ pip install softposit

Note: To avoid incompatibility issues, make sure no other version of NumPy or TensorFlow are installed. I suggest creating a virtual environment.

Usage

Try your first Deep PeNSieve program

$ python
>>> import numpy as np
>>> import tensorflow as tf
>>> np.posit32(np.pi)
3.141593
>>> a = tf.constant(0.3, dtype=tf.posit8)
>>> b = tf.constant(0.7, dtype=tf.posit8)
>>> with tf.Session() as sess:
...     print(f'Using Posit8, {a.eval()} + {b.eval()} = {tf.add(a,b).eval()}')
...
Using Posit8, 0.296875 + 0.703125 = 1.0

Source files

The actual source files of the project are stored inside the src folder. it contains three folders:

  • TensorFlow. Contains scripts for generating and training CN models.
  • SoftPosit. Contains scripts for generating same models as in TensorFlow folder, and perform low-precision inference with 8-bit posits using quire and fused operations.
  • TF_Lite. Contains scripts for creating TensorFlow Lite models from trained models on single-precision floating-point at TensorFlow folder.

Contributing

Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.

Please make sure to update tests as appropriate.

Authors and credits

Deep PeNSieve is managed by Raul Murillo (contact: [email protected]).

The software uses NumPy, and relies heavily on TensorFlow and SoftPosit.

Deep PeNSieve is the result of our paper. If you find this code useful in your research, please consider citing:

Raul Murillo, Alberto A. Del Barrio, and Guillermo Botella. "Deep PeNSieve: A deep learning framework based on the posit number system." Digital Signal Processing 102 (2020): 102762, doi: 10.1016/j.dsp.2020.102762.

@article{murillo2020deep,
  title={Deep PeNSieve: A deep learning framework based on the posit number system},
  author={Murillo, Raul and Del Barrio, Alberto A and Botella, Guillermo},
  journal={Digital Signal Processing},
  volume={102},
  pages={102762},
  year={2020},
  issn={1051-2004},
  doi={https://doi.org/10.1016/j.dsp.2020.102762},
  url={https://www.sciencedirect.com/science/article/pii/S105120042030107X},
  publisher={Elsevier}
}

This code was tested on an Ubuntu 18.04 system.

License

Apache License 2.0

Acknowledgements

This work has been supported by the Community of Madrid under grant S2018/TCS-4423, the EU (FEDER) and the Spanish MINECO under grant RTI2018-093684-B-I00 and by Banco Santander under grant PR26/16-20B-1.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].