Giter Site home page Giter Site logo

tensorflow2caffe's Introduction

tensorflow2caffe

Convert a model from TensorFlow to Caffe.

The code has been created during this video series:
Part 1 - Creating the architectures
Part 2 - Exporting the parameters
Part 3 - Adapting and comparing

In the videos, the creation of the code has been commented so if you want to get more information about the code you can get it there.

The code uses tflearn, not native Tensorflow.
If you use native Tensorflow, some alterations are necessary (e.g. the export of the parameters).
To understand how to convert succesfully, studying the code might help you.

If you want to convert your own model, start with the export_parameters.py file to get the weights and biases of your model (make sure to change the .model and the layer array and use your own architecture).
Then recreate your architecture in a .prototxt file and use the create_caffemodel.py file to convert your weights and biases to the Caffe format (make sure to change the file so that it fits your network).
Now you should have your .prototxt and .caffemodel in addition to your TensorFlow architecture and .model file.
If you want you can compare the outputs of both networks using the test_network files.

tensorflow2caffe's People

Contributors

lfatality avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.