擅长:python、mysql、java
<p>我认为最重要的原因是</p>
<ul>
<li>Tensorflow服务利用了gRPC和Protobuf,而普通的
FlaskWeb服务使用REST和JSON。JSON依赖于htp1.1,而
gRPC使用HTTP/2(<a href="https://code.tutsplus.com/tutorials/rest-vs-grpc-battle-of-the-apis cms-30711" rel="nofollow noreferrer">there are important differences</a>)。此外,
Protobuf是一种二进制格式,用于序列化数据和<a href="https://auth0.com/blog/beating-json-performance-with-protobuf/" rel="nofollow noreferrer">it is more
efficient than JSON</a>。在</li>
<li>TensorFlow服务于同一型号,使用硬件(如GPU)更合适。在</li>
<li>TensorFlow服务可以管理模型版本控制</li>
</ul>
<p>几乎所有的事情,它在很大程度上取决于你拥有的用例和你的场景,所以考虑利弊和你的需求是很重要的。TensorFlow服务有很好的特性,但是这些特性也可以通过一些努力来实现,以便与Flask一起工作(例如,您可以创建批处理机制)。在</p>