Arbitrary precision integers in TensorFlow.
Project description
TF Big
TF Big provides some basic operations for big integers. TF Big uses libgmp for its optimized big integer routines.
Developer Requirements
Ubuntu
The only requirement for Ubuntu is to have docker installed. This is the recommended way to build custom operations for tensorflow. Please see the documentation here. We provide a custom development container for TF Big which contains the libgmp dependency already installed.
The documentation for installing docker on Ubuntu can be found here.
MacOS
TODO simplify this, add a bootstrap script to Makefile
Since we can't use a MacOS docker container, setting up a development environment is a little more involved. We need four things:
- Python 3.5 or 3.6
- Homebrew
- Bazel 0.15.0
- libgmp
- Tensorflow 1.13.1 TODO support 1.14, might be a little involved
We recommend using Anaconda to set up a Python 3.5 or 3.6 environment. Once Anaconda is installed this can be done with:
$ conda create -n py36 python=3.6
$ source activate py36
We recommed using Homebrew to install the next couple of dependencies. This can be installed easily with:
$ /usr/bin/ruby -e "$(curl -fsSL \
https://raw.githubusercontent.com/Homebrew/install/master/install)"
Bazel recommends installing with their binary installed. The documentation for this can be found here. But if you have Homebrew already installed you can install bazel with a couple of simple commands:
$ brew tap bazelbuild/tap
$ brew install bazelbuild/tap/bazel
Next, we can install libgmp with Homebrew:
brew install gmp
Tensorflow will be installed automatically when using the Makefile so no need to install it manually but it can be done before hand by using pip:
pip install tensorflow==1.13.1
Building
Tests
Ubuntu
Run the tests on Ubuntu by running the make test
command inside of a docker container. Right now, the docker container doesn't exist on docker hub yet so we must first build it:
docker build -t tf-encrypted/tf-big:0.1.0 .
Then we can run make test
:
sudo docker run -it -v `pwd`:/opt/my-project \
-w /opt/my-project \
tf-encrypted/tf-big:0.1.0 /bin/bash -c "make test"
MacOS
Once the environment is set up we can simply run:
make test
This will install Tensorflow if not previously installed and build and run the tests.
Pip Package
TODO
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distributions
Built Distributions
Hashes for tf_big-0.1.1-cp36-cp36m-macosx_10_7_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0631fb8fadbdbb51c0373a15b944ab69cadcac08e4cded32a1978d1963f44a18 |
|
MD5 | 074f49346db3da972333b62e24dacc1b |
|
BLAKE2b-256 | 9544ddda143843779a39abf3b50581732e9863284ddf073ddb7933e334beb0aa |
Hashes for tf_big-0.1.0-cp37-cp37m-macosx_10_7_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | b08b6540b51fa86ab555cb1bafff7e69c3e59a3cd5c4da0628f1b9e727f00224 |
|
MD5 | dd614ec347a89a9c52cac581ee85a281 |
|
BLAKE2b-256 | db8ac5e92dc5ee84fda04786096df4e6a6c56eefeb946bec1d784e515677e11b |
Hashes for tf_big-0.1.0-cp36-cp36m-manylinux1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1d96fc95edc97388f144ea90e0c3c098ba881a0f3d5141ead8b738794c4743b4 |
|
MD5 | 8152fe0e432bfd8795aa9843f3dce4b3 |
|
BLAKE2b-256 | 9f67e36ed8667e65dca78c0a527cb2aeefc49c4b2333ad827304be0e0f5d817c |
Hashes for tf_big-0.1.0-cp36-cp36m-macosx_10_7_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | beb643fcd1d5d9f82b2b51b8efff786a4a66364684db3ce1dbe3b6069007216b |
|
MD5 | 0f017dad2c106c719adc08eddd942d3b |
|
BLAKE2b-256 | 31440b17b5a3064d350d6bec32d363f25feee1654631fdc3d28b39ded9ceace1 |
Hashes for tf_big-0.1.0-cp35-cp35m-manylinux1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5d8cd483a7754c2b2f5c1dcc746c958f14917fb4fb41fdc8bb417ecfdd755fe6 |
|
MD5 | 30251207e88014abf7437e23a96d711a |
|
BLAKE2b-256 | 94231be28c918d16bdaec9fb59d5bf17fec23f2540f643dbcc45048a6b6b3222 |
Hashes for tf_big-0.1.0-cp35-cp35m-macosx_10_6_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8c8daaf2b86de47ff7277689b02ad0236b64a9800ffba3a3584ec691fbae7ed7 |
|
MD5 | 8c5d84d34fad659266054b568cf04757 |
|
BLAKE2b-256 | fdc6a1f635c974e4ff0c70622e3a173f5d6d8f314a0414c09808fe10bc4644a6 |