pytorch/caffe2/python/onnx
Lu Fang a5a1c9a171 Automatic update of fbcode/onnx to fb1a80692c1ab0bd27b1072f2e7bffacba336777 (#18585)
Summary:
Pull Request resolved: https://github.com/pytorch/pytorch/pull/18585

Previous import was b29e78a4efb8e5d8995f576bbf19a846807829b6

Included changes:
- **[fb1a8069](https://github.com/onnx/onnx/commit/fb1a8069)**: Fix wrongly handled attribute in MVN and test generating scripts (#1877) <Raymond Yang>
- **[b22041c3](https://github.com/onnx/onnx/commit/b22041c3)**: Add dilation attribute to MaxPool (#1864) <karljang>

Reviewed By: zrphercule, benoitsteiner

Differential Revision: D14668623

fbshipit-source-id: fa7f44b1ecc949d8dd654939d20b1e93db98b1d2
2019-03-28 23:47:10 -07:00
..
bin Remove Apache headers from source. 2018-03-27 13:10:18 -07:00
tests Automatic update of fbcode/onnx to fb1a80692c1ab0bd27b1072f2e7bffacba336777 (#18585) 2019-03-28 23:47:10 -07:00
__init__.py
backend_cpp_rep.py Remove Apache headers from source. 2018-03-27 13:10:18 -07:00
backend_rep.py Rename cuda_gpu_id to device_id in DeviceOption (#12456) 2018-10-09 15:54:04 -07:00
backend.py Unify gpu_support variable in python tests (#16748) 2019-02-07 00:29:51 -08:00
error.py Remove Apache headers from source. 2018-03-27 13:10:18 -07:00
frontend.py Fix caffe2 => onnx exporter for ConvTranspose (#14143) 2018-11-26 15:51:42 -08:00
helper.py [Caffe2] Scoped dummy name generator (#6458) 2018-04-16 11:58:02 -07:00
onnxifi.py Fix batch insert (#17158) 2019-02-15 12:28:23 -08:00
ONNXOpCoverage.md Update the ONNX op coverage in C2 2018-06-29 17:25:19 -07:00
README.md Add README and ONNXOpCoverage doc back (#2102) 2018-03-01 17:05:25 -08:00
test_onnxifi.py Skip tests if C2/ONNX models cannot be read (#18494) 2019-03-27 11:21:44 -07:00
workspace.py Disallow using the OOP api workspace as context managers (#6456) 2018-04-09 22:13:54 -07:00

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