Skip to content
forked from kuangliu/mocha

Convert torch model to/from caffe model easily

Notifications You must be signed in to change notification settings

shamangary/mocha

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

41 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

2017/08/21 (Tsun-Yi Yang)

  • Fix relu inconsistent top name problem
  • Add Tanh layer
  • Add example convertion file form torch to caffe: convert.lua

How to convert torch model to caffe model?

Step.1
Change the name inside convert.lua

Step.2
th convert.lua

Mocha: Convert torch model to/from caffe model easily

Caffe: load with Python.
Torch: load with Lua.

Q. How to connect Python & Lua code?
A. We don't need directly interact Python code with Lua code, which is complex. We use intermediate file exchange, the model parameters are saved to disk layer by layer as .npy file, and then loaded to caffe/torch separately.

TODO:

  • Caffe split layer -> Torch ConcatTable
  • PReLU
  • More tests

About

Convert torch model to/from caffe model easily

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 55.4%
  • Lua 44.6%