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.

構(gòu)建一個(gè)expect_input_receiver_fn,期待提供給 tf.Examples.

創(chuàng)建一個(gè) serve_input_receiver_fn,其期望將序列化的 tf.Example 反饋到字符串占位符.該函數(shù)根據(jù)提供的 feature_spec 解析 tf.Example,并將所有已解析的Tensors 作為特征返回.

ARGS:

  • feature_spec:字符串 VarLenFeature/FixedLenFeature 的一個(gè) dict.
  • default_batch_size:每批次預(yù)期的查詢示例數(shù).為了變量批量大小,保留未設(shè)置(推薦).

返回:

返回適合在服務(wù)中使用的 serving_input_receiver_fn.

以上內(nèi)容是否對(duì)您有幫助:
在線筆記
App下載
App下載

掃描二維碼

下載編程獅App

公眾號(hào)
微信公眾號(hào)

編程獅公眾號(hào)