JDAI-CV / DNNLibrary

Daquexian's NNAPI Library. ONNX + Android NNAPI
Apache License 2.0
346 stars 59 forks source link

ONNX operators needed to be supported #17

Open daquexian opened 5 years ago

daquexian commented 5 years ago

This issue is to summarize all operators which needed to be supported. If you want an operator to be supported, please feel free to post it here.

AmienKhaled commented 5 years ago

Constant operator

daquexian commented 5 years ago

PReLU has been supported in #23

@AmienKhaled I'll implement it soon

daquexian commented 5 years ago

@AmienKhaled @yunhaia

In version 0.6.0, identity, prelu and constant op should be supported (please also use the latest onnx2daq)

ericdanz commented 5 years ago

Reshape can only be the last layer

daquexian commented 5 years ago

@ericdanz reshape layer is somewhat special due to the difference between nhwc(nnapi) and nchw(onnx) layout. I think there is no general, simple way to implement reshape layer, and most reshape layers in an onnx model are indeed generated implicitly. Could you please provide your model so that I can analyze it?

ericdanz commented 5 years ago

I can share the onnx file. Quick warning - it's a bit complicated ;) https://drive.google.com/file/d/1WdWn12HPr5Ziz69PBk-JyU8YtiEfU2mu/view?usp=sharing

There are a few places reshape is used, in my special batchnorm and shuffle-net like layers.

daquexian commented 5 years ago

@ericdanz Thanks for your model. Unfortunately, the reshape here is hard to implement in nnapi. I'll open another issue to track it. However, it may be a long-term work.

ericdanz commented 5 years ago

Concat is causing some problems - had to disable the shape checking in shaper.cpp

Upsample is also not supported yet.

Made a model that is compatible, about to test it out! Very excited to see more and more ops supported ;)

daquexian commented 5 years ago

Thanks for your valuable information!

I will look into it today (It is 7:06 AM, GMT+8 here XD)

Thanks again!

On Tue, Jan 29, 2019, 4:08 AM ericdanz <notifications@github.com wrote:

Concat is causing some problems - had to disable the shape checking in shaper.cpp

Upsample is also not supported yet.

Made a model that is compatible, about to test it out! Very excited to see more and more ops supported ;)

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/daquexian/DNNLibrary/issues/17#issuecomment-458282131, or mute the thread https://github.com/notifications/unsubscribe-auth/ALEcn6OwqZ0UXXKevlqqWEUYgcwGG6lvks5vH1i3gaJpZM4ZM5hH .

mbishop-neurala commented 5 years ago

Transpose would be useful when converting caffe models.

neginraoof commented 4 years ago

@ericdanz @daquexian Do you happen to have such large pytorch model that could be further optimized after ONNX export?