问题标签 [serving]
For questions regarding programming in ECMAScript (JavaScript/JS) and its various dialects/implementations (excluding ActionScript). Note JavaScript is NOT the same as Java! Please include all relevant tags on your question; e.g., [node.js], [jquery], [json], [reactjs], [angular], [ember.js], [vue.js], [typescript], [svelte], etc.
tensorflow - 如何离线安装tensorflow服务
我的服务器在我的公司网络中,该网络已与 Internet 断开连接。我只能在其他办公计算机上下载所需的文件并上传。
我 git clone
git clone --recurse-submodules https://github.com/tensorflow/serving
cd serving
cd tensorflow
./configure cd ..
Configuration is ok as the default advices.
But when I want to bazel the repository.
[root@centos7 /data/mig_predictor/pre_installation/serving]# bazel build -c opt ... --package_path /data/mig_predictor/pre_installation ....```
ERROR: error loading package 'serving/tensorflow/tensorflow/tools/pip_package': Extension file not found. Unable to load package for '//tensorflow/core:platform/default/build_config_root.bzl': BUILD file not found on package path. ERROR: error loading package 'serving/tensorflow/tensorflow/tools/pip_package': Extension file not found. Unable to load package for '//tensorflow/core:platform/default/build_config_root.bzl': BUILD file not found on package path. INFO: Elapsed time: 0.481s
如何为预下载的包指向本地存储库?谢谢!
tensorflow - Tensorflow:服务模型总是返回相同的预测
我需要你的帮助我现在有点卡住了。
我重新训练了一个分类张量流模型,它给出了非常好的结果。现在我想通过 tensorflow 服务来服务它。我设法为它服务,但是当我使用它时,无论输入是什么,它总是给我相同的结果。
我认为我导出模型的方式有问题,但我不知道是什么。下面是我的代码。
有人可以帮助我吗?非常感谢各位
这是将我的输入图像转换为 tf 可读对象的函数:
这就是我导出模型的方式:
predict_inputs_tensor_info=tf.saved_model.utils.build_tensor_info(predict_inputs_tensor) classes_output_tensor_info=tf.saved_model.utils.build_tensor_info(classes_output_tensor) score_output_tensor_info=tf.saved_model.utils.build_tensor_info(scores_output_tensor)
tf.saved_model.signature_constants.DEFAULT_SERVING_SIGNATURE_DEF_KEY:classification_signature,}
python - 如何将检查点转换为张量流服务中使用的保存模型
我用 char-rnn-tensorflow ( https://github.com/sherjilozair/char-rnn-tensorflow ) 训练了一个模型。模式保存到检查点。现在我想为模型提供 tensorflow 服务。
谷歌搜索了很多关于这个的教程,只发现这符合我的需求。当我将代码作为教程更改为以下内容时。它返回“node_name 不在图中”错误。
用“[n.name for n in tf.get_default_graph().as_graph_def().node]”得到图中所有节点的名称,超过 10000 对我来说很疯狂,我想知道哪个属于我。
所以这里的问题是,有没有更好的方法来查找我在训练时使用的节点名称。或任何更好的解决方案将检查点转换为 tensorlfow 服务中使用的 savemodel?
谢谢!
javascript - 快速提供静态文件:不同位置的服务器和客户端
我试图让我的快递服务于另一个位置的静态文件:
这是我拥有的当前目录:
我试图只使用app.use(express.static(path.join(__dirname, '..', 'client')));
,但它根本不会提供文件。但是,当我将其path.join
用于获取请求时'/'
,它将发送文件。
这是我目前拥有的代码。感谢上帝,它正在工作,但我想看看是否有办法让我在不实际发送文件的情况下提供它。
python - 如何使用 tensorflow-serving 发布自定义(非 tensorflow)模型?
我已经阅读了基本和高级tensorflow-serving 教程,但我仍然不清楚如何在 tensorflow-serving 中为以下内容构建支持:
- 用 Python 构建的模型(如 xgboost 或 scikit-learn)
- R 中内置的模型(如 xgboost 或 lightgbm)
考虑使用 TFBT tf.contrib
,但据此, TensorFlow Boosted Trees (TFBT)与 xgboost 相比需要更长的训练时间,并且观察到它的精度更差。
任何帮助或建议将不胜感激......
tensorflow - Combining user specific TensorFlow models into one, based on the userId
Seeking advice on how to approach a situation where we have to train the same simple model (not NNs) for each individual user and their content which must remain private - this means I would theoretically have 150k different models to deploy/operate in parallel (possibly a nightmare).
Is it possible in TensorFlow to train/freeze these individual models completely separately, and then load + combine them into one larger model for saving at deployment time (as no training is required) that takes a userId as an additional input.
If not, is there a typical approach to this problem?
python - 为模型提供服务时,找不到名称为空的张量
系统信息
- Linux Ubuntu 16.04:
- 从 pip (1.10.1)安装的 TensorFlow Serving :
- TensorFlow 服务版本 1.10.1:
描述问题
我在服务自己的模型时发现了一个有线错误消息,我用saved_model.load测试了.pb文件,一切都很好,但是当我通过客户端发送请求时,报告以下错误:
<_Rendezvous 的 RPC 终止于:status = StatusCode.INVALID_ARGUMENT details = "Tensor :0, 在图中未找到 feed_devices 或 fetch_devices 中指定的" debug_error_string = "{"created":"@1537040456.210975912","description": "从对等方收到错误","file":"src/core/lib/surface/call.cc","file_line":1099,"grpc_message":" Tensor :0,在 feed_devices 或 fetch_devices 中未找到图表","grpc_status":3}" >
连线部分是报告未找到的张量没有名称,我猜这是因为客户端要求输入这个空张量。但我只是不知道这个操作可能来自哪里。
复制的确切步骤
我基于mnist客户端和inception客户端示例代码构建服务,导出的.pb模型已经通过tf.saved_model.loader.load重新加载测试成功,所以我认为问题是由请求引起的。
这是客户端代码的一部分:
tensorflow - bazel 使用本地下载的 tensorflow 构建 tensorflow 服务
tensorflow 服务构建依赖于大型 tensorflow;但我已经成功构建了 tensorflow。所以我想用它。我做这些事情:我改变了 tensorflow 服务 WORKSPACE(org: https://github.com/tensorflow/serving/blob/master/WORKSPACE )
但我用这个命令错误构建:
应该如何使用本地 tensorflow 成功构建服务?谢谢你!
java - Dropwizard:无法提供静态 HTML
我目前正在处理 Dropwizard 中根路径“/”的静态 html 页面。到目前为止,我只收到一个错误页面,说明“HTTP ERROR 404 Problem访问/。原因:未找到”。
我已经按照1.2.2 的 Dropwizard 文档以及此处的本教程进行了此操作,并对代码进行了一些更改以使我的服务正常工作。我的 .yml 文件中的根路径是/profile/v1
允许我的 getAll 服务工作(当我第一次开始时,我收到了一个错误,因为有Multiple servlets map to path /*
.yml 看起来像这样:
另外,我在主应用类中的初始化是:
这在球衣上注册为:
/resources
我在目录之外保存我的静态资产的目录在哪里java
。
到目前为止,我已经能够让我的服务在这个设置中正常工作。例如,当我转到 localhost:8080/profile/v1/name/getAll 时,我能够从数据库中检索所有名称,如果我转到 localhost:8080/profile/v1/titles/getAll,我从数据库中获取所有标题。如果我使用 localhost:8080,带或不带“/”,我只会得到一个 404 页面,说它找不到“/”。理论上,这应该很简单,所以我不确定我还应该做什么。
编辑:
当我转到 /profile/v1 时,我得到以下信息:
我应该提到我不希望在这里提供我的 html;我希望它在根目录下提供服务,因为我的所有服务都使用路径 /profile/v1。这是为了帮助设置 DNS。