Skip to main content

A pipeline to convert pretrained PyTorch image models to Tensorflow format for deployment

Project description

pytorch-2-tf

This library is a pipeline designed to convert pretrained PyTorch image models to Tensorflow format for deployment.

Introduction

I'm someone who loves PyTorch for its flexibility — it's really great for churning out machine learning models quickly that perform reasonably well.

However, I'm also someone who works a lot with deploying machine learning models to mobile devices. PyTorch, unfortunately, is still quite lacking in that respect. TensorFlow is simply more flexible when it comes to deployment, with support across a variety of platforms from mobile phones to simpler embedded devices.

Thus, it's useful to be able to convert trained PyTorch model checkpoints to TensorFlow format so one can quickly deploy ML models into a real-world setting. However, current intermediary formats like ONNX often result in accuracy loss when converting between formats, which is unacceptable for some applications. This library aims to provide an easy way for developers to quickly deploy trained PyTorch models using the power of TensorFlow's support for various deployment platforms.

Dependencies

Pytorch-2-tf uses argparse, which is a parser for command-line options, arguments, and sub-commands; json, a data-interchange format; tqdm, a progress bar for Python; torch, an open source machine learning library; and numpy, a library that supports large, multi-dimensional arrays and matrices.

Contributing

See CONTRIBUTING.md.

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

pytorch2tf-0.0.1.tar.gz (1.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

pytorch2tf-0.0.1-py3-none-any.whl (2.7 kB view details)

Uploaded Python 3

File details

Details for the file pytorch2tf-0.0.1.tar.gz.

File metadata

  • Download URL: pytorch2tf-0.0.1.tar.gz
  • Upload date:
  • Size: 1.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/50.3.0 requests-toolbelt/0.9.1 tqdm/4.42.1 CPython/3.7.6

File hashes

Hashes for pytorch2tf-0.0.1.tar.gz
Algorithm Hash digest
SHA256 3fb46abc99d127622448a2f52de2621da65e0c9c4db82af174cba447a2d5a9ce
MD5 33775725a8cce9a988e023b346a5c582
BLAKE2b-256 8bde503cb6256e0e5194e896c523d3019b0dcc77395ddb6bd52fb03940085d75

See more details on using hashes here.

File details

Details for the file pytorch2tf-0.0.1-py3-none-any.whl.

File metadata

  • Download URL: pytorch2tf-0.0.1-py3-none-any.whl
  • Upload date:
  • Size: 2.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/50.3.0 requests-toolbelt/0.9.1 tqdm/4.42.1 CPython/3.7.6

File hashes

Hashes for pytorch2tf-0.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 43d3d714b4825474eb832b7ea6d28d1025fffbe42b32b8ea81ce4e6c16dcaf37
MD5 1729465ba689ce62a18528194a42b915
BLAKE2b-256 15ba4235af5a309b993bb4ecd3a8e07f49b038ff973953fec3edf09bbbe75d7c

See more details on using hashes here.

Supported by

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