Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/stjordanis/gluon2keras
Gluon to Keras deep neural network model converter
https://github.com/stjordanis/gluon2keras
Last synced: 3 months ago
JSON representation
Gluon to Keras deep neural network model converter
- Host: GitHub
- URL: https://github.com/stjordanis/gluon2keras
- Owner: stjordanis
- License: mit
- Created: 2021-01-30T15:45:16.000Z (almost 4 years ago)
- Default Branch: master
- Last Pushed: 2018-12-23T22:13:50.000Z (almost 6 years ago)
- Last Synced: 2024-01-22T21:06:06.716Z (10 months ago)
- Size: 8.79 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome-tensorflow - gluon2keras - Convert Gluon models to Keras (with TensorFlow backend) format (Libraries)
- fucking-awesome-tensorflow - gluon2keras - Convert Gluon models to Keras (with TensorFlow backend) format (Libraries)
README
# gluon2keras
Gluon to Keras deep neural network model converter[![Build Status](https://travis-ci.com/nerox8664/gluon2keras.svg?branch=master)](https://travis-ci.com/nerox8664/gluon2keras)
[![GitHub License](https://img.shields.io/badge/License-MIT-blue.svg)](https://opensource.org/licenses/MIT)
[![Python Version](https://img.shields.io/badge/python-2.7%2C3.6-lightgrey.svg)](https://github.com/nerox8664/gluon2keras)## 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.