dataset_schema.py 文件源码

python
阅读 26 收藏 0 点赞 0 评论 0

项目:transform 作者: tensorflow 项目源码 文件源码
def from_feature_spec(feature_spec):
  """Convert a feature_spec to a Schema.

  Args:
    feature_spec: a features specification in the format expected by
        tf.parse_example(), i.e.
        `{name: FixedLenFeature(...), name: VarLenFeature(...), ...'

  Returns:
    A Schema representing the provided set of columns.
  """
  return Schema({
      key: _from_parse_feature(parse_feature)
      for key, parse_feature in six.iteritems(feature_spec)
  })
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号