pytorch/caffe2/python/onnx
Yinghai Lu 5fe2697655 Initialize tensor with fp32 in Caffe2Backend.prepare() (#15832)
Summary:
Fix https://github.com/pytorch/pytorch/issues/14104
Pull Request resolved: https://github.com/pytorch/pytorch/pull/15832

Reviewed By: bddppq

Differential Revision: D13598332

Pulled By: yinghai

fbshipit-source-id: 3302ac47928974f49353c5da8af440e5c1716c22
2019-01-08 22:33:52 -08:00
..
bin
tests Automatic update of fbcode/onnx to 8384c788939bc65463f9754b6a7a00b212b18ba1 (#15739) 2019-01-04 15:56:55 -08:00
__init__.py
backend.py Initialize tensor with fp32 in Caffe2Backend.prepare() (#15832) 2019-01-08 22:33:52 -08:00
backend_cpp_rep.py
backend_rep.py Rename cuda_gpu_id to device_id in DeviceOption (#12456) 2018-10-09 15:54:04 -07:00
error.py
frontend.py Fix caffe2 => onnx exporter for ConvTranspose (#14143) 2018-11-26 15:51:42 -08:00
helper.py
onnxifi.py Support communicating with C2 protobuf in Onnxifi flow (#15472) 2019-01-07 22:12:29 -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