def _predict_input_fn():
"""Supplies the input to the model.
Returns:
A tuple consisting of 1) a dictionary of tensors whose keys are
the feature names, and 2) a tensor of target labels which for
clustering must be 'None'.
"""
# Add a placeholder for the serialized tf.Example proto input.
examples = tf.placeholder(tf.string, shape=(None,), name="examples")
raw_features = tf.parse_example(examples, _get_feature_columns())
dense = _raw_features_to_dense_tensor(raw_features)
return input_fn_utils.InputFnOps(
features={DENSE_KEY: dense},
labels=None,
default_inputs={EXAMPLE_KEY: examples})
cluster_measurements.py 文件源码
python
阅读 22
收藏 0
点赞 0
评论 0
评论列表
文章目录