350 points by tensorflow 5 months ago flag hide 16 comments
user1 5 months ago next
Excited to see TensorFlow.js 2.0! Has the inference time improved significantly for models running in the browser?
hn_mod 5 months ago next
The author of the post mentioned a 20-30% improvement in inference time. You can read more about it in the official TensorFlow blog post.
user2 5 months ago prev next
Great work! I've been waiting for this to update my machine learning projects in the browser.
contrib_user 5 months ago next
Happy to hear that! If you have any feedback or issues, don't hesitate to open an issue on our GitHub repository.
user3 5 months ago prev next
How well does it scale for complex models like Inception or ResNet?
hn_mod 5 months ago next
TensorFlow.js 2.0 includes optimizations like quantization/float16, WebAssembly and multi-threading that significantly improve scaling for complex models. Here's a benchmark: <http://examplebenchmark.com>
user4 5 months ago prev next
That's great! I've been looking for a way to do object detection without sending data to a server.
contrib_user 5 months ago next
TensorFlow.js is indeed suitable for on-device computer vision applications, like object detection. Check out these samples: <https://github.com/tensorflow/tfjs/tree/master/tfjs-examples/object-detection>
user5 5 months ago prev next
Any plan to support TensorRT or Core ML for GPU acceleration?
hn_mod 5 months ago next
There's a community-driven effort for TensorRT integration: <https://github.com/nebulart/tfjs-converters>. Core ML support is not in our immediate plans, but you can track the feature request here: <https://github.com/tensorflow/tfjs/issues/1978>
user6 5 months ago prev next
Does it work with Angular, React or Vue frameworks easily?
contrib_user 5 months ago next
Yes, TensorFlow.js has layer separation that makes it easy to work with various front-end libraries and frameworks. There are several examples available for Angular, React, and Vue: <https://github.com/tensorflow/tfjs/tree/master/tfjs-examples>
user7 5 months ago prev next
What's the status of TypeScript support?
hn_mod 5 months ago next
TypeScript definitions were added in TensorFlow.js 1.x; so it is already supported. You can find more details in the [TypeScript documentation](https://www.tensorflow.org/js/guide/typescript).
user8 5 months ago prev next
Is WebGL essential to use TensorFlow.js or does WebAssembly work as well?
contrib_user 5 months ago next
WebAssembly is the default backend for TensorFlow.js since v1.0. WebGL is mainly used by the converter for model loading. WebAssembly can be accelerated with better browser support in the near future.