pfnet-research / chainer-compiler

Experimental toolchain to compile and run Chainer models
MIT License
112 stars 23 forks source link

Export and run all models in ChainerCV #16

Closed shinh closed 5 years ago

shinh commented 5 years ago

100% coverage for https://github.com/chainer/chainercv/tree/master/chainercv/links/model could be a great goal for both elichika and compiler+runtime.

$ cd chainercv/links/model && grep -ho 'F\.\w\+' **/*.py | sort | uniq

Looking at the result of the above command, the following ops look important.

F.huber_loss
F.normalize
F.roi_pooling_2d
F.unpooling_2d
F.upsampling_2d
L.DilatedConvolution2D

Some of the above have standard ONNX ops. It would be also great if we add support of them in ONNX-chainer.

shinh commented 5 years ago

| | ONNX-Chainer | Chainer-compiler | F.huber_loss | (1) | (3) | F.normalize | PR, merged | Need chainerx op | F.roi_pooling_2d | PR | Need chainerx op | F.unpooling_2d | No ONNX Op | Need chainerx op | F.upsampling_2d | MaxUnpool (*2) | Need chainerx op | L.DilatedConvolution2D | OK | Need chainerx op

(1) Sub, Abs, Where, Mul(Pow) ? onnxruntime lacks Where (2) onnxruntime master only. PR is ready. (3) same as (1). chainerx op is easier

comments from tanaka-san

shinh commented 5 years ago

Memo: chainercv/examples/fpn/demo.py needs Unpooling2D and ROIAverageAlign2D

shinh commented 5 years ago

F.unpooling_2d looks similar to Upsample, but as per tanaka-san, it cannot fully represent chainer's semantics for ksize=3 or outsize!=None

shinh commented 5 years ago

Most of them are handled.