This repository has been archived by the owner on Nov 17, 2023. It is now read-only.
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Caffe to MXNet code translator (#8782)
Caffe Translator is a migration tool that helps developers migrate their existing Caffe code to MXNet and continue further development using MXNet. Caffe Translator takes the training/validation prototxt and solver prototxt as input and produces MXNet Python code as output. The translated Python code uses MXNet Symbol and Module API to build the network, reads data from LMDB files, runs training and saves the trained model using the MXNet Module API. More info here: https://github.com/apache/incubator-mxnet/tree/master/tools/caffe_translator * Add Caffe Translator. Caffe Translator translates Caffe training/validation prototxt to MXNet Python code. * Minor bug fix. * [WIP] Convergence test for caffe translator * [WIP - Caffe Translator testing] Skeleton code for going thorough each test, translating, training, testing and generating report. Details are yet to be filled. * [WIP - Caffe Translator Test] Add code to create directory and invoke translator. * [WIP Caffe Converter tests] Train the converted network and collect logs. * [WIP - Caffe Translator test] Add code to search for a particular metric in log file and extract it. * - Bug fixes - Code refactoring * Add ‘num_examples’ parameter to generated CaffeDataIter. CaffeDataIter requires user to provide number of examples in the dataset using the num_examples parameter. However this information is not available in Caffe prototxt. This commit lets user add this information to the caffe prototxt as a comment. Caffe will parse it as comment and ignore it. Translator will pick the value and use it while generating CaffeDataIter. Example usage: data_param { source: "data/mnist/mnist_train_lmdb" #caffe2mxnet num_examples: 60000 batch_size: 64 backend: LMDB } * Update README.md * Update README.md * Update README.md * Create faq.md * Update faq.md * Update faq.md * Update faq.md * Update faq.md * Update faq.md * Update faq.md * Update README.md * Update README.md * Get test directory as input from command line. * Refactor code. * Don't print translated code to console. * Make sure "#caffemxnet num_examples: ..." doesn't go into iterator's prototxt. * Add sample test_dir * Add data directory * Add test configuration. Use the name test.cfg instead of test_description.txt * Create README.md * Update faq.md * Update faq.md * Update faq.md * Add script to convert .caffemodel to .params file. Only handles convolution and fuly connected layers. But can be easily extended to handle other layers. * Add ability to initialize networks with pretrained weights. * Add ability to convert weights for Deconvolution, BatchNorm and Scale. * Code cleanup. * Code cleanup. Remove the Constants class. * Code cleanup. * Code cleanup * Cleanup. Replace "indhub/mxnet" with "apache/incubator-mxnet". * Fix lint errors. * Fix lint issues. * Add few more solvers for lenet * Fix a regression. * Add Apache license. * Remove automated tests. * Create fat jar. Set version to 0.9.0. * Add license header. * Remove the 'all' suffix from the fat jar name. * Update README.md * Update README.md * Update README.md * Update README.md * Update gradle wrapper to use shadow plugin. * Initial work for signing and uploading artifacts to maven. * Include jar signature in the artifacts that get uploaded. * Add gradle properties required for signing and uploading artifacts to maven. * Print helpful error message when translator is not able to find the prototxt. * Print helpful error message in console and add a helpful comment in the generated code when an unknown lr policy is encountered. * Add final modifier when appropriate. * Rename GenHelper to GenerationHelper. * Expand imports * Some code style changes. * Update README.md * Update README.md * Create build_from_source.md * Update README.md * Update faq.md * Update README.md * Update build_from_source.md * Update README.md * Update README.md * Update faq.md * - Add source and doc jar. - Add ability to upload to staging repo. - Make sure all .asc files get uploaded. * Update README.md * Update maven pom with fields required for uploading artifacts. * Bump version to 0.9.1 * Update README.md Add the list of command line parameters accepted by the Caffe Translator. * Update README.md Update repo location * After successful translation, print a message indicating the translation was success. * Update README.md * Update README.md * Update faq.md * Update README.md * Update README.md Provide a sample translated output * Update README.md Add links to examples to show how the following items looks like: 1. Translated code. 2. LMDB file. 3. Model saved after training. * Rename #caffe2mxnet directive to #CaffeToMXNet to avoid any confusion with Caffe 2.
- Loading branch information