简体   繁体   English

如何部署tensorflow系统? 张量流服务?

[英]how to deploy tensorflow system? tensorflow serving?

I have built a recommender system with tf.keras. 我已经使用tf.keras构建了一个推荐系统。

I'd like to deploy this to a live environment. 我想将此部署到实际环境中。

One thing I could do is, create a python-based webserver (django) that takes (http) rest request, do the prediction with the trained model and gives back the result as a rest response. 我可以做的一件事是,创建一个基于python的Web服务器(django),该服务器接受(http)休息请求,使用经过训练的模型进行prediction ,并将结果作为休息响应返回。

I wonder if there's recommended alternative than doing the above? 我想知道是否有建议的替代方法?

I can guess tensorflow serving might be related to what I'm trying to do, but couldn't tell for sure.. 我可以猜测tensorflow服务可能与我正在尝试做的事情有关,但无法确定。

  • I'm subsclassing tf.keras.models.Model to create my model, and it doesn't support model.save() only model.save_weights .. It might affect my options I guess. 我将tf.keras.models.Model子类化以创建我的模型,它不支持model.save()model.save_weights ..我猜这可能会影响我的选择。

Tesnsorflow serving is the way to go here: https://github.com/tensorflow/serving Tesnsorflow服务是前往此处的方式: https : //github.com/tensorflow/serving

It has some very good features: https://youtu.be/CxUc5FJF_9w?t=1056 And this video is very informative in general about TensorFlow serving and TFX. 它具有一些非常好的功能: https ://youtu.be/CxUc5FJF_9w?t=1056并且该视频通常非常有益于TensorFlow服务和TFX。

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

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