All Projects → gzuidhof → Nn Transfer

gzuidhof / Nn Transfer

Licence: mit
Convert trained PyTorch models to Keras, and the other way around

Programming Languages

python
139335 projects - #7 most used programming language

Projects that are alternatives of or similar to Nn Transfer

Html To Markdown
⚙️ Convert HTML to Markdown. Even works with entire websites and can be extended through rules.
Stars: ✭ 155 (-24.39%)
Mutual labels:  converter
Yarle
Yarle - The ultimate converter of Evernote notes to Markdown
Stars: ✭ 170 (-17.07%)
Mutual labels:  converter
Swagger Toolbox
💡 Swagger schema model (in yaml, json) generator from json data
Stars: ✭ 194 (-5.37%)
Mutual labels:  converter
Relaxed
Create PDF documents using web technologies
Stars: ✭ 11,656 (+5585.85%)
Mutual labels:  converter
Dot To Ascii
Graphviz to ASCII converter using Graph::Easy
Stars: ✭ 168 (-18.05%)
Mutual labels:  converter
Tfk8s
A tool for converting Kubernetes YAML manifests to Terraform HCL
Stars: ✭ 167 (-18.54%)
Mutual labels:  converter
Curl To Csharp
curl to C# converter
Stars: ✭ 153 (-25.37%)
Mutual labels:  converter
Currency Converter Swift3.0 Viper
Calculates money quick and easy way to see live foreign exchange rates (Based on swift 4.2, viper architecture and special thanks to https://github.com/hakanensari/fixer-io for conversion API)
Stars: ✭ 198 (-3.41%)
Mutual labels:  converter
Goxml2json
XML to JSON converter written in Go (no schema, no structs)
Stars: ✭ 170 (-17.07%)
Mutual labels:  converter
Mayo
3D CAD viewer and converter based on Qt + OpenCascade
Stars: ✭ 192 (-6.34%)
Mutual labels:  converter
Gltf To Usdz Research
Research and proof of concept of converting glTF to USDZ for AR Quick Look (iOS 12+).
Stars: ✭ 164 (-20%)
Mutual labels:  converter
Converter
database table to golang struct (table to struct) converter with cli and go lib support
Stars: ✭ 167 (-18.54%)
Mutual labels:  converter
Api Flow
Universal data structure and converter for API formats (Swagger, RAML, Paw, Postman…)
Stars: ✭ 185 (-9.76%)
Mutual labels:  converter
Showdown
A bidirectional Markdown to HTML to Markdown converter written in Javascript
Stars: ✭ 12,137 (+5820.49%)
Mutual labels:  converter
Markdown Pdf
📄 Markdown to PDF converter
Stars: ✭ 2,365 (+1053.66%)
Mutual labels:  converter
Core
Server core components which are a part of ONLYOFFICE Document Server
Stars: ✭ 152 (-25.85%)
Mutual labels:  converter
Node Js2xmlparser
Popular Node.js module for parsing JavaScript objects into XML
Stars: ✭ 171 (-16.59%)
Mutual labels:  converter
Jsonsubtypes
Discriminated Json Subtypes Converter implementation for .NET
Stars: ✭ 201 (-1.95%)
Mutual labels:  converter
Evernote2md
Convert Evernote .enex files to Markdown
Stars: ✭ 193 (-5.85%)
Mutual labels:  converter
Ts Mongoose
Automatically infer TypeScript interfaces from mongoose schemas🙀
Stars: ✭ 188 (-8.29%)
Mutual labels:  converter

nn-transfer

Build Status

NOTE: This repository does not seem to yield the correct output anymore with the latest versions of Keras and PyTorch. Take care to verify the results or use an alternative method for conversion.

This repository contains utilities for converting PyTorch models to Keras and the other way around. More specifically, it allows you to copy the weights from a PyTorch model to an identical model in Keras and vice-versa.

From Keras you can then run it on the TensorFlow, Theano and CNTK backend. You can also convert it to a pure TensorFlow model (see [1] and [2]), which allows you to choose more robust deployment options in the cloud, or even mobile devices. From Keras you can also do inference in browsers with keras-js.

Installation

Clone this repository, and simply run

pip install .

You need to have PyTorch and torchvision installed beforehand, see the PyTorch website for how to easily install that.

Tests

To run the unit and integration tests:

python setup.py test
# OR, if you have nose2 installed,
nose2

There is also Travis CI which will automatically build every commit, see the button at the top of the readme. You can test the direction of weight transfer individually using the TEST_TRANSFER_DIRECTION environment variable, see .travis.yml.

How to use

See example.ipynb for a small tutorial on how to use this library.

Code guidelines

  • This repository is fully PEP8 compliant, I recommend flake8.
  • It works for both Python 2 and 3.
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].