caffe esorflow提供服务
Posted zbxzc
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了caffe esorflow提供服务相关的知识,希望对你有一定的参考价值。
caffe提供服务
Caffe,PyCaffe上手实践2 基于Flask的图像分类服务
https://github.com/kendricktan/xraychecker
https://github.com/zzningxp/flask-image-retrieval
https://github.com/sugyan/inception-app-example
Tensorflow Serving with support for Caffe
https://github.com/rayglover-ibm/serving-caffe
tensorflow提供服务
https://www.tensorflow.org/serving/
https://github.com/tensorflow/serving/tree/master/tensorflow_serving/example
https://github.com/llSourcell/How-to-Deploy-a-Tensorflow-Model-in-Production
Tensorflow Serving 模型部署和服务
TensorFlow Serving,GPU版安装
Bazel 安装及遇到的问题
https://github.com/bazelbuild/bazel/releaseshttps://stackoverflow.com/questions/42519010/how-to-do-batching-in-tensorflow-serving
Tensorflow serving(tf_serving) 安装测试说明
tensorflow serving for centos 7.2
http://www.cnblogs.com/YouXiangLiThon/tag/tensorflow%20serving/
模型导出
tf.train.Saver
用于保存和恢复Variable。它可以非常方便的保存当前模型的变量或者倒入之前训练好的变量。一个最简单的运用:
saver - tf.train.Saver()
Save the variables to disk.
saver.save(sess, “/tmp/test.ckpt”)
Restore variables from disk.
saver.restore(sess, “/tmp/test.ckpt”)
tf.contrib.session_bundle.exporter.Exporter
导出模型还需要这个 Exporter 的协助。
Exporter 的基本使用方式是
1.传入 saver 构造一个实例
2.调用 init 定义模型的 graph 和 input/output
3.使用 export 导出为文件
import numpy as np
import tensorflow as tf
from tensorflow.contrib.session_bundle import exporter
model_path = 'snapshots' # 'experiments/train_experiment/checkpoints'
# Tensorflow specific configuration
config = tf.ConfigProto(allow_soft_placement=True)
config.gpu_options.allow_growth = True
sess = tf.Session(config=config)
latest_checkpoint = tf.train.latest_checkpoint(model_path)
if latest_checkpoint:
print("Loading model checkpoint ...\\n".format(latest_checkpoint))
metagraph_file = latest_checkpoint + '.meta'
saver = tf.train.import_meta_graph(metagraph_file)
saver.restore(sess, latest_checkpoint)
print("Checkpoint loaded\\n\\n")
else:
print("No checkpoints available!\\n\\n")
image_data = sess.graph.get_tensor_by_name('input/Placeholder:0')
softmax_tensor = sess.graph.get_tensor_by_name('output/Softmax:0')
model_exporter = exporter.Exporter(saver)
model_exporter.init(sess.graph.as_graph_def(),
named_graph_signatures=
'inputs': exporter.generic_signature('x': image_data),
'outputs': exporter.generic_signature('y': softmax_tensor)
)
model_exporter.export('model', tf.constant(1), sess)
https://github.com/triagemd/model-serving
https://github.com/songbinliu/inceptionServer
https://github.com/vishh/tf-serving-base
https://github.com/tanveer941/Object-detection-sever
https://github.com/peppaseven/object_detector_server
https://github.com/arixlin/server_object_detection
https://github.com/BlueLens/bl-detect
https://github.com/jsonw99/object_detect_serving
https://github.com/movchan74/tensorflow_serving_examples
https://github.com/TensorLab/tensorfx
https://github.com/aaxwaz/Serving-TensorFlow-Model
https://github.com/hetaoaoao/tensorflow_web_deploy
构建并用 TensorFlow Serving 部署 Wide & Deep 模型
keras提供服务
keras export model
基本思路是将keras模型导出为tf model,然后利用tfserv
keras model to tensorflow model
https://github.com/alanswx/keras_to_tensorflow
https://github.com/amir-abdi/keras_to_tensorflow
https://github.com/krystianity/keras-serving
https://github.com/movchan74/tensorflow_serving_examples
https://github.com/bshao001/TF-Model-Deploy-Tutorial
https://stackoverflow.com/questions/42969779/keras-error-you-must-feed-a-value-for-placeholder-tensor-bidirectional-1-keras
https://github.com/keras-team/keras/issues/2310
object detect serving
https://github.com/rayglover-ibm/serving-caffe/blob/caffe/tensorflow_serving/example/obj_detector_pb2.py
https://github.com/tanveer941/Object-detection-sever
以上是关于caffe esorflow提供服务的主要内容,如果未能解决你的问题,请参考以下文章