chainer / onnx-chainer

Add-on package for ONNX format support in Chainer
MIT License
85 stars 24 forks source link

Support input shapes option #210

Closed disktnk closed 5 years ago

disktnk commented 5 years ago

fixes #187

Example graph when set input_shapes=('b',)+x.shape[1:]

image

[NOTE1]

Updated shape information in value_info are set by onnx.shape_inference module. There are some unsupported node by the module, like Concat. then set empty (Netron show 0 when shape is empty)

image

Some runtime (ONNXRuntime, MXNet) could run correctly even if set 0

[NOTE2]

Currently the below code is not supported, shape value of reshaped is fixed and not set as dynamic parameter.

s = x.shape[0]
y = x.reshape(s, -1)
codecov-io commented 5 years ago

Codecov Report

Merging #210 into master will increase coverage by 0.28%. The diff coverage is 94.64%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #210      +/-   ##
==========================================
+ Coverage   89.87%   90.15%   +0.28%     
==========================================
  Files          24       24              
  Lines        1471     1513      +42     
==========================================
+ Hits         1322     1364      +42     
  Misses        149      149
Impacted Files Coverage Δ
onnx_chainer/export.py 92.83% <94.64%> (+1.35%) :arrow_up:

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update a75c88b...8cb854f. Read the comment docs.

disktnk commented 5 years ago

/test

pfn-ci-bot commented 5 years ago

Successfully created a job for commit 8cb854f: