codecamp

TensorFlow怎么解析固定长度输入功能

函数:tf.FixedLenFeature

FixedLenFeature 类

定义在:tensorflow/python/ops/parsing_ops.py.

参阅指南:输入和读取器>协议缓冲区示例

用于解析固定长度输入功能的配置.

提供一个 default_value,将稀疏输入作为稠密处理;否则,任何示例缺少此功能的解析函数将失败.

函数字段:

  • shape:输入数据的形状.
  • dtype:输入数据类型.
  • default_value:如果示例缺少此功能将要使用的值.它必须与 dtype 和指定形状兼容.

函数属性

  • default_value
    字段2的别名
  • dtype
    字段1的别名
  • shape
    字段号0的别名

函数方法

  • __new__

    __new__(
        cls,
        shape,
        dtype,
        default_value=None
    )
利用标量值填充TensorFlow张量
TensorFlow从文件中输出记录的读取器
温馨提示
下载编程狮App,免费阅读超1000+编程语言教程
取消
确定