A multi-language library for translating commands between PyTorch, TensorFlow, and TensorFlow.js
Project description
Threepio Python Client
Threepio is a multi-language library for translating commands between PyTorch, TensorFlow, and TensorFlow.js This section of the code-base is for the Python Client.
Installation
Use the package manager pip to install threepio.
pip install openmined.threepio
Usage
import tensorflow as tf
from pythreepio import Threepio, Command
# Create a threepio translating from pytorch -> tensorflow python
threepio = Threepio("torch", "tf", tf)
# Create your command to translate
args = [
tf.constant([[1, 0], [0, 1]]),
tf.constant([[0, 1], [1, 0]])
]
kwargs = {}
cmd = Command("add", args, kwargs)
# Translate the command
translated_cmd = threepio.translate(cmd, lookup_command=True)
...
# When you're ready, execute the translation
translated_cmd.execute_routine() # -> [[1, 1], [1, 1]]
Command Support
Support for commands is currently limited. Officially supported commands are listed in our tests.
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 Distribution
openmined.threepio-0.0.1.tar.gz
(73.5 kB
view details)
File details
Details for the file openmined.threepio-0.0.1.tar.gz
.
File metadata
- Download URL: openmined.threepio-0.0.1.tar.gz
- Upload date:
- Size: 73.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.6.0 requests-toolbelt/0.9.1 tqdm/4.46.1 CPython/3.8.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 61cb821e25d0e28473f9f617f5fc349e87c3b092f8ffd44fd8152976276ef3eb |
|
MD5 | 10b4c7ef9091c5175eaa5f93f4e5e05b |
|
BLAKE2b-256 | 5d49fc80c893f98b7c352e01d8b3208691be9f578fcd2b35b6ab08a3a2f41c1f |