Skip to main content

The deep learning models convertor

Project description

gluon2keras

Gluon to Keras deep neural network model converter

Build Status GitHub License Python Version

Installation

git clone https://github.com/nerox8664/gluon2keras
cd gluon2keras
pip install -e .

or you can use pip:

pip install gluon2keras

Usage

# Get a model from gluon cv
from gluoncv2.model_provider import get_model as glcv2_get_model
net = glcv2_get_model("xception")

# Make sure it's hybrid and initialized
net.hybridize()
net.collect_params().initialize()

# Test input
input_np = np.random.uniform(0, 1, (1, 3, 299, 299))
gluon_output = net(mx.nd.array(input_np))

# Keras model
k_model = gluon2keras(net, [(1, 3, 299, 299)], verbose=True, names='short')
error = check_error(gluon_output, k_model, input_np)

Code snippets

Look at the tests directory.

License

This software is covered by MIT License.

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

gluon2keras-0.0.2.tar.gz (3.2 kB view details)

Uploaded Source

File details

Details for the file gluon2keras-0.0.2.tar.gz.

File metadata

  • Download URL: gluon2keras-0.0.2.tar.gz
  • Upload date:
  • Size: 3.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.12.1 pkginfo/1.4.2 requests/2.18.4 setuptools/39.1.0 requests-toolbelt/0.8.0 tqdm/4.26.0 CPython/3.6.6

File hashes

Hashes for gluon2keras-0.0.2.tar.gz
Algorithm Hash digest
SHA256 82b5db391daae97946fccf6db47eb1a914cc3809fdb359aecf8dea4d3355868b
MD5 dd441a0e8b4575e98a829a4e913afc23
BLAKE2b-256 e0d344038a24e34ddddce8ac0ec0c0232cfa0cbe765c0c4768d04c93cba552c8

See more details on using hashes here.

Supported by

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