https://github.com/chainer/onnx-chainer
Add-on package for ONNX format support in Chainer
https://github.com/chainer/onnx-chainer
caffe chainer deep-learning onnx onnx-chainer onnx-format onnx-support
Last synced: 10 months ago
JSON representation
Add-on package for ONNX format support in Chainer
- Host: GitHub
- URL: https://github.com/chainer/onnx-chainer
- Owner: chainer
- License: mit
- Created: 2017-11-21T05:23:33.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2019-11-06T09:38:25.000Z (over 6 years ago)
- Last Synced: 2025-07-14T20:23:42.974Z (12 months ago)
- Topics: caffe, chainer, deep-learning, onnx, onnx-chainer, onnx-format, onnx-support
- Language: Python
- Homepage:
- Size: 1.18 MB
- Stars: 85
- Watchers: 16
- Forks: 24
- Open Issues: 13
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# ONNX-Chainer
[](https://pypi.org/project/onnx-chainer/)
[](https://github.com/chainer/onnx-chainer)
[](https://travis-ci.org/chainer/onnx-chainer)
[](https://codecov.io/gh/chainer/onnx-chainer)
[](https://onnx-chainer.readthedocs.io/en/latest/?badge=latest)
All code and functionalities of ONNX-Chainer have been merged into [Chainer](https://chainer.org/) v7rc1 and this repository supports only bug fixes.
This is an add-on package for ONNX support by Chainer.
## Tested environment
see [Tested environments](https://onnx-chainer.readthedocs.io/en/latest/introduction/index.html#tested-environments)
## Installation
```bash
pip install onnx-chainer
```
## Run Test
### 1. Install test modules
```bash
$ pip install onnx-chainer[test-cpu]
```
Or, on GPU environment
```bash
$ pip install cupy # or cupy-cudaXX is useful
$ pip install onnx-chainer[test-gpu]
```
### 2. Run tests
```bash
$ pytest -m "not gpu"
```
Or, on GPU environment
```bash
$ pytest
```
## Quick Start
First, install [ChainerCV](https://github.com/chainer/chainercv) to get the pre-trained models.
```python
import numpy as np
import chainer
import chainercv.links as C
import onnx_chainer
model = C.VGG16(pretrained_model='imagenet')
# Pseudo input
x = np.zeros((1, 3, 224, 224), dtype=np.float32)
onnx_chainer.export(model, x, filename='vgg16.onnx')
```
## Supported Functions
see [Supported Functions](https://onnx-chainer.readthedocs.io/en/latest/introduction/index.html#supported-functions)
## Contribution
Any contribution to ONNX-Chainer is welcome!
- Python codes follow [Chainer Coding Guidelines](https://docs.chainer.org/en/stable/contribution.html#coding-guidelines)