TensorFlow解析Example

2018-10-02 13:07 更新

tf.estimator.export.build_parsing_serving_input_receiver_fn

build_parsing_serving_input_receiver_fn(
    feature_spec,
    default_batch_size=None
)

定义在:tensorflow/python/estimator/export/export.py.

构建一个expect_input_receiver_fn,期待提供给 tf.Examples.

创建一个 serve_input_receiver_fn,其期望将序列化的 tf.Example 反馈到字符串占位符.该函数根据提供的 feature_spec 解析 tf.Example,并将所有已解析的Tensors 作为特征返回.

ARGS:

  • feature_spec:字符串 VarLenFeature/FixedLenFeature 的一个 dict.
  • default_batch_size:每批次预期的查询示例数.为了变量批量大小,保留未设置(推荐).

返回:

返回适合在服务中使用的 serving_input_receiver_fn.

以上内容是否对您有帮助:
在线笔记
App下载
App下载

扫描二维码

下载编程狮App

公众号
微信公众号

编程狮公众号

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy