gluon2keras
Gluon to Keras deep neural network model converter
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.
Metadata
Release files for gluon2keras 0.0.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| gluon2keras-0.0.2.tar.gz | 3.2 kB | Without provenance | Details for gluon2keras-0.0.2.tar.gz |
Release files / gluon2keras-0.0.2.tar.gz
| Download URL | gluon2keras-0.0.2.tar.gz |
|---|---|
| Size | 3.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
82b5db391daae97946fccf6db47eb1a914cc3809fdb359aecf8dea4d3355868b
|
|
BLAKE2b-256 checksum How to use checksums |
e0d344038a24e34ddddce8ac0ec0c0232cfa0cbe765c0c4768d04c93cba552c8
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is 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
|
Security for gluon2keras 0.0.2
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.