4 ms·
Still pretty terrible compared to PyTorch _unless_ you need deployment to device, in which case it's basically the only game in town. Or at least the only _viab
by m0zg 7y ago
Still pretty terrible compared to PyTorch _unless_ you need deployment to device, in which case it's basically the only game in town. Or at least the only _viable_ game.
Case in point: people are still trying to figure out on their github how to apply global weight decay when training a model, and to get a "correct" resize for segmentation you have to fall back to the legacy 1.x API and specify align_corners=true there. These bugs existed for many years, and nobody gives a damn. That said if your choice is between 1.x and 2.0, 2.0 is much easier to work with, especially if you use something other than TF (e.g. PyTorch) for data pipeline and augmentation. You can hook that up pretty seamlessly if you train in eager mode.
- akhilcacharya 7y agoHas ONNX not caught fire on mobile yet?
- sairahul82 7y agoIt has but not as good as tensorflow support. This is one thing i miss truly in pytorch. Otherwise pytorch is wonderful.
- applecrazy 7y agoDoesn't CoreML abstract 90% of the actual model format/training source away? Last time I played with it in Xcode, it was painless to pull a pretrained TF model and use as-is.
- Q6T46nT668w6i3m 7y agoThe number of operations supported by CoreML or Onyx is limited.
- akhilcacharya 7y agoWhat's an example of a missing operator?
- ghop02 7y agoCore ML 3 adds a ton of new operations, including control flow support. https://heartbeat.fritz.ai/whats-new-in-core-ml-3-d108d352e50a https://heartbeat.fritz.ai/whats-new-in-core-ml-3-d108d352e5...
- throwawaybbqed 7y agoWhat about Android?
- pjmlp 7y agoAndroid has its own incompatible world with NN and NDK fun. https://developer.android.com/ndk/reference/group/neural-networks https://developer.android.com/ndk/reference/group/neural-net... Or you get to use Tensorflow Lite and target both platforms, also with a smaller feature set than its big brother. https://www.tensorflow.org/lite/guide/get_started https://www.tensorflow.org/lite/guide/get_started
- m0zg 7y agoBut, crucially, larger feature set than the likes of CoreML etc. You don't get access to the NPU that way though, at least not on iOS. The only acceleration option there seems to be Metal. Which isn't bad, but also not the most power efficient thing the hardware supports. Still though, it's the only game in town if you don't want to have insane un-debuggable headaches everywhere you deploy to device. Plus it also supports embedded Linux boards, and pretty much all current TPU-like things available there.
- m0zg 7y agoIt has? Where? Who uses ONNX for anything? I doubt it even can work, period. The moment you do anything other than a bare bones classifier (which nobody really runs on devices - you need more complex models to solve real world problems) you run into ops unsupported by your inference framework, and that's if ONNX is supported by its tooling in the first place. In fact you could also run into unsupported ops during export as well: that is, it is somewhat likely that you won't even be able to export your model unless it consists entirely of the ops ONNX standard implements. The rest can be exported as opaque ops, but your inference tooling will not know what to do with those for sure.
- sairahul82 7y agoI agree with you only basic models works !!
- tsbinz 7y agoIt can work for more than a bare bones classifier. It's certainly not painless and sometimes you need some manual work to translate your model but work it does ...
- throwawaybbqed 7y agoFor mobile, the situation seems worse than a year ago. TF Mobile mostly worked. The current situation with TF lite is a joke .. tried a real-world Pytorch -> ONYX -> TF/TF lite and it has been weeks of misery.
- Reebz 7y agoI think it’s getting easier by the day to port a PyTorch model to something that can be production ready, like Tensorflow Lite. It’s cumbersome, but doable. For me, I like to optimize my workbench and just deal with the final steps of pain to get it to prod.
- smhx 7y agoThere might be some additional help on the way directly in PyTorch for on-device :) - iOS: https://github.com/pytorch/pytorch/pulls?utf8=%E2%9C%93&q=is%3Apr+ios+ https://github.com/pytorch/pytorch/pulls?utf8=%E2%9C%93&q=is... - Android: https://github.com/pytorch/pytorch/pulls?utf8=%E2%9C%93&q=is%3Apr+android+ https://github.com/pytorch/pytorch/pulls?utf8=%E2%9C%93&q=is...
- antimora 7y agoI haven't explored yet but has anyone tried TVM for PyTorch? https://github.com/pytorch/tvm https://github.com/pytorch/tvm