pytorch/caffe2/python/onnx
Tongliang Liao 491f2d4cb8 Support conversion from Caffe2 MergeDim to ONNX Reshape + Squeeze. (#16189)
Summary:
`MergeDim` can be done by `Reshape([1, -1, 0, 0, ...]) + Squeeze`.
Pull Request resolved: https://github.com/pytorch/pytorch/pull/16189

Differential Revision: D14070676

Pulled By: ezyang

fbshipit-source-id: 28d7e9b35cc2c1dcbd4afb3fbdf7383e219b1777
2019-02-13 15:53:38 -08:00
..
bin
tests Support conversion from Caffe2 MergeDim to ONNX Reshape + Squeeze. (#16189) 2019-02-13 15:53:38 -08:00
__init__.py
backend.py Unify gpu_support variable in python tests (#16748) 2019-02-07 00:29:51 -08:00
backend_cpp_rep.py
backend_rep.py
error.py
frontend.py Fix caffe2 => onnx exporter for ConvTranspose (#14143) 2018-11-26 15:51:42 -08:00
helper.py
onnxifi.py Use bound shape inference in onnxifi transform (#16598) 2019-02-06 16:34:37 -08:00
ONNXOpCoverage.md
README.md
test_onnxifi.py Make sure we bind input/output of Onnxifi op positionally (#14214) 2018-11-22 00:31:01 -08:00
workspace.py

Caffe2 implementation of Open Neural Network Exchange (ONNX)

Usage

Installation

onnx-caffe2 is installed as a part of Caffe2. Please follow the instructions to install Caffe2.

Folder Structure

  • ./: the main folder that all code lies under
    • frontend.py: translate from caffe2 model to onnx model
    • backend.py: execution engine that runs onnx on caffe2
  • tests/: test files

Testing

onnx-caffe2 uses pytest as test driver. In order to run tests, first you need to install pytest:

pip install pytest-cov

After installing pytest, do

pytest

to run tests.

Testing coverage issues/status: https://github.com/caffe2/caffe2/blob/master/caffe2/python/onnx/ONNXOpCoverage.md

Development

During development it's convenient to install caffe2 in development mode:

cd /path/to/caffe2
pip install -e caffe2/

License

MIT License