简体   繁体   English

什么是双向模型格式兼容性?

[英]What is the two-way model-format compatibility?

I am reading Deep Learning with JavaScript but get bogged down by this line:我正在阅读Deep Learning with JavaScript但被这一行陷入困境:

Adding to the multidimensional capability of TensorFlow.js is its status as a first-class integrated part of the larger TensorFlow/Keras ecosystem, specifically its API consistency and two-way model-format compatibility with the Python libraries.除了 TensorFlow.js 的多维功能之外,它还具有作为更大的 TensorFlow/Keras 生态系统的一流集成部分的地位,特别是它的 API 一致性和与 Python 库的双向模型格式兼容性。

I wonder what it means by 'two-way model-format compatibility with the Python libraries.'?我想知道“与 Python 库的双向模型格式兼容性”是什么意思。 Does it mean that models(pb files) trained by normal Python Tensorflow can be loaded by TF.js.networks or served by JavaScript?这是否意味着由普通 Python Tensorflow 训练的模型(pb 文件)可以由 TF.js.networks 加载或由 JavaScript 提供服务?

If so, why do we need TensorFlow.js to support training?如果是这样,为什么我们需要 TensorFlow.js 来支持训练? We can just train models using Python Tensorflow libraries and use JavaScript libraries for inference.我们可以只使用 Python Tensorflow 库训练模型并使用 JavaScript 库进行推理。

Does it mean that models(pb files) trained by normal Python Tensorflow can be loaded by TF.js.networks or served by JavaScript?这是否意味着由普通 Python Tensorflow 训练的模型(pb 文件)可以由 TF.js.networks 加载或由 JavaScript 提供服务?

For standard models, yes, thats exactly what it means对于标准模型,是的,这正是它的意思
But if you use custom ops or ops provided by some non-standard TF addon, then you'd have to re-implement them in TFJS yourself但是如果你使用一些非标准 TF 插件提供的自定义操作或操作,那么你必须自己在 TFJS 中重新实现它们

If so, why do we need TensorFlow.js to support training?如果是这样,为什么我们需要 TensorFlow.js 来支持训练? We can just train models using Python Tensorflow libraries and use JavaScript libraries for inference我们可以只使用 Python Tensorflow 库训练模型并使用 JavaScript 库进行推理

Not everyone is comfortable with Python , maybe someone wants to start with machine learning in JS不是每个人都对Python感到满意,也许有人想从JS中的机器学习开始

Also, what if I want to run training in browser using WebGL or WebGPU ?另外,如果我想使用WebGLWebGPU在浏览器中运行训练怎么办?
Not everyone has CUDA -enabled box to run GPU-accelerated training不是每个人都有启用CUDA的盒子来运行 GPU 加速训练

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM