RandomUniformLike

RandomUniformLike - 22

版本

此版本的运算符自 版本 22 起可用。

摘要

生成一个张量,其中包含从均匀分布中抽取的随机值。输出张量的形状复制自输入张量的形状,均匀分布的参数由 lowhigh 指定。

数据类型由“dtype”参数指定,如果未提供,则从输入张量复制。“dtype”参数必须是 TensorProto 消息中“DataType”枚举字段中指定的数据类型之一,并且作为输出类型有效。

属性

  • dtype - INT :

    (可选)输出张量元素的数据类型,如果未指定,我们将使用输入张量的数据类型。

  • high - FLOAT (默认值为 '1.0')

    输出值的上限。

  • low - FLOAT (默认值为 '0.0')

    输出值的下限。

  • 种子 - 浮点型 :

    (可选)随机生成器的种子,如果未指定,我们将自动生成一个。

输入

  • input (异构) - T1

    从中复制形状和可选类型信息的输入张量。

输出

  • output (异构) - T2

    从均匀分布中抽取的随机值输出张量。

类型约束

  • T1 包含 ( tensor(bfloat16), tensor(bool), tensor(complex128), tensor(complex64), tensor(double), tensor(float), tensor(float16), tensor(int16), tensor(int32), tensor(int64), tensor(int8), tensor(string), tensor(uint16), tensor(uint32), tensor(uint64), tensor(uint8) )

    约束为任意张量类型。如果未提供 dtype 属性,则这必须是有效的输出类型。

  • T2 包含 ( tensor(bfloat16), tensor(double), tensor(float), tensor(float16) )

    将输出类型限制为浮点张量。

RandomUniformLike - 1

版本

此版本的运算符自 版本 1 起可用。

摘要

生成一个张量,其中包含从均匀分布中抽取的随机值。输出张量的形状复制自输入张量的形状,均匀分布的参数由 lowhigh 指定。

数据类型由“dtype”参数指定,如果未提供,则从输入张量复制。“dtype”参数必须是 TensorProto 消息中“DataType”枚举字段中指定的数据类型之一,并且作为输出类型有效。

属性

  • dtype - INT :

    (可选)输出张量元素的数据类型,如果未指定,我们将使用输入张量的数据类型。

  • high - FLOAT (默认值为 '1.0')

    输出值的上限。

  • low - FLOAT (默认值为 '0.0')

    输出值的下限。

  • 种子 - 浮点型 :

    (可选)随机生成器的种子,如果未指定,我们将自动生成一个。

输入

  • input (异构) - T1

    从中复制形状和可选类型信息的输入张量。

输出

  • output (异构) - T2

    从均匀分布中抽取的随机值输出张量。

类型约束

  • T1 包含 ( tensor(bool), tensor(complex128), tensor(complex64), tensor(double), tensor(float), tensor(float16), tensor(int16), tensor(int32), tensor(int64), tensor(int8), tensor(string), tensor(uint16), tensor(uint32), tensor(uint64), tensor(uint8) )

    约束为任意张量类型。如果未提供 dtype 属性,则这必须是有效的输出类型。

  • T2 包含 ( tensor(double), tensor(float), tensor(float16) )

    将输出类型限制为浮点张量。