pytorch / glow

Compiler for Neural Network hardware accelerators
Apache License 2.0
3.24k stars 694 forks source link

Tensorflow loader #2423

Open dati91 opened 5 years ago

dati91 commented 5 years ago

Hi!

I started to look into this project and seems really cool. But I noticed it only supports Caffe2 and ONNX formats. Will it support other loaders e.g. Tensorflow? Is it on the roadmap?

Thanks in advance!

jackm321 commented 5 years ago

I'm not aware right now of any plans to support Tensorflow importing directly but you may be able to convert a Tensorflow graph to ONNX using https://github.com/onnx/tensorflow-onnx and then import the ONNX model.

dati91 commented 5 years ago

@jackm321 Thanks for the quick reply!

I actually looked into that project and another ( https://github.com/Microsoft/MMdnn ), but I couldn't manage to convert it correctly to load into Glow.

But I looked into the Caffe2Loader code and seemed pretty straight forward, so if I decide to use Glow for my project maybe I can contribute that to this awesome project.

tlepley-cadence commented 5 years ago

@dati91 We have been using tf2onnx (the project pointed out by @jackm321) and it works well, even if we need to fix issues with the converter and/or the Glow ONNX loader some time to time. But having a native TensorFlow loader in Glow would be in my opinion a nice to have. Is it what you have in mind when you speak about contributing to Glow ?