codecamp

TensorFlow函数教程:tf.io.FixedLenSequenceFeature

tf.io.FixedLenSequenceFeature函数

类 FixedLenSequenceFeature

别名:

  • 类 tf.FixedLenSequenceFeature
  • 类 tf.io.FixedLenSequenceFeature

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

用于将可变长度输入要素解析为Tensor的配置。

生成的解析单个SequenceExample或Example的Tensor具有静态shape:[None] + shape和指定的dtype。解析batch_size大小的多个Example的结果Tensor具有静态shape:[batch_size, None] + shape和指定的dtype。来自不同示例的批处理中的条目将使用default_value填充到批处理中存在的最大长度。

要将稀疏输入视为密集,请提供allow_missing=True;否则,任何缺少此功能的示例的解析函数都将失败。

字段:

  • shape:维度为2和更高的输入数据的shape。第一维是可变长度的None。
  • dtype:输入的数据类型。
  • allow_missing:是否允许功能列表项中缺少此功能。仅可用于解析SequenceExample而不用于解析Examples。
  • default_value:标量值,用于将多个Examples填充到其最大长度。与解析单个Example或SequenceExample无关。对于dtype字符串,默认为“ ”,否则为0(可选)。

__new__

@staticmethod
__new__(
    cls,
    shape,
    dtype,
    allow_missing=False,
    default_value=None
)

创建FixedLenSequenceFeature的新实例(shape,dtype,allow_missing,default_value)

属性

shape

dtype

allow_missing

default_value

TensorFlow函数教程:tf.io.FixedLenFeature
TensorFlow函数教程:tf.io.is_jpeg
温馨提示
下载编程狮App,免费阅读超1000+编程语言教程
取消
确定
目录

TensorFlow 函数介绍

TensorFlow 函数模块:tf

TensorFlow的image模块

TensorFlow使用之tf.io

TensorFlow使用之tf.keras

TensorFlow函数教程:tf.keras.applications

TensorFlow函数教程:tf.keras.backend

TensorFlow使用之tf.metrics

TensorFlow使用之tf.nn

TensorFlow使用之tf.python_io

TensorFlow 功能函数

关闭

MIP.setData({ 'pageTheme' : getCookie('pageTheme') || {'day':true, 'night':false}, 'pageFontSize' : getCookie('pageFontSize') || 20 }); MIP.watch('pageTheme', function(newValue){ setCookie('pageTheme', JSON.stringify(newValue)) }); MIP.watch('pageFontSize', function(newValue){ setCookie('pageFontSize', newValue) }); function setCookie(name, value){ var days = 1; var exp = new Date(); exp.setTime(exp.getTime() + days*24*60*60*1000); document.cookie = name + '=' + value + ';expires=' + exp.toUTCString(); } function getCookie(name){ var reg = new RegExp('(^| )' + name + '=([^;]*)(;|$)'); return document.cookie.match(reg) ? JSON.parse(document.cookie.match(reg)[2]) : null; }