Constant

Constant - 24

版本

  • 名称: Constant (GitHub)

  • : main

  • 起始版本24

  • 函数: False

  • 支持级别: SupportType.COMMON

  • 形状推断: True

此版本的操作符已可用于版本 24 及以上

摘要

此操作符生成一个常量张量。必须且只能指定提供的属性中的一个,即 value、sparse_value 或 value_*。

属性

  • sparse_value - 稀疏张量 :

    输出张量元素的稀疏格式值。

  • value - 张量 :

    输出张量元素的值。

  • value_float - 浮点数 :

    标量、float32 类型输出张量的唯一元素值。

  • value_floats - 浮点数数组 :

    1D、float32 类型输出张量的元素值。

  • value_int - 整型 :

    标量、int64 类型输出张量的唯一元素值。

  • value_ints - 整型数组 :

    1D、int64 类型输出张量的元素值。

  • value_string - 字符串 :

    标量、UTF-8 字符串类型输出张量的唯一元素值。

  • value_strings - 字符串数组 :

    1D、UTF-8 字符串类型输出张量的元素值。

输出

  • 输出 (异构) - T

    包含所提供张量相同值的输出张量。

类型约束

  • T 在 ( tensor(bfloat16), tensor(bool), tensor(complex128), tensor(complex64), tensor(double), tensor(float), tensor(float16), tensor(float4e2m1), tensor(float8e4m3fn), tensor(float8e4m3fnuz), tensor(float8e5m2), tensor(float8e5m2fnuz), tensor(float8e8m0), tensor(int16), tensor(int32), tensor(int4), tensor(int64), tensor(int8), tensor(string), tensor(uint16), tensor(uint32), tensor(uint4), tensor(uint64), tensor(uint8) )

    将输入和输出类型限制为所有张量类型。

Constant - 23

版本

  • 名称: Constant (GitHub)

  • : main

  • 起始版本23

  • 函数: False

  • 支持级别: SupportType.COMMON

  • 形状推断: True

此版本的操作符已可用于版本 23 及以上

摘要

此操作符生成一个常量张量。必须且只能指定提供的属性中的一个,即 value、sparse_value 或 value_*。

属性

  • sparse_value - 稀疏张量 :

    输出张量元素的稀疏格式值。

  • value - 张量 :

    输出张量元素的值。

  • value_float - 浮点数 :

    标量、float32 类型输出张量的唯一元素值。

  • value_floats - 浮点数数组 :

    1D、float32 类型输出张量的元素值。

  • value_int - 整型 :

    标量、int64 类型输出张量的唯一元素值。

  • value_ints - 整型数组 :

    1D、int64 类型输出张量的元素值。

  • value_string - 字符串 :

    标量、UTF-8 字符串类型输出张量的唯一元素值。

  • value_strings - 字符串数组 :

    1D、UTF-8 字符串类型输出张量的元素值。

输出

  • 输出 (异构) - T

    包含所提供张量相同值的输出张量。

类型约束

  • T 在 ( tensor(bfloat16), tensor(bool), tensor(complex128), tensor(complex64), tensor(double), tensor(float), tensor(float16), tensor(float4e2m1), tensor(float8e4m3fn), tensor(float8e4m3fnuz), tensor(float8e5m2), tensor(float8e5m2fnuz), tensor(int16), tensor(int32), tensor(int4), tensor(int64), tensor(int8), tensor(string), tensor(uint16), tensor(uint32), tensor(uint4), tensor(uint64), tensor(uint8) )

    将输入和输出类型限制为所有张量类型。

Constant - 21

版本

  • 名称: Constant (GitHub)

  • : main

  • since_version: 21

  • 函数: False

  • 支持级别: SupportType.COMMON

  • 形状推断: True

此版本的操作符自 版本 21 起可用。

摘要

此操作符生成一个常量张量。必须且只能指定提供的属性中的一个,即 value、sparse_value 或 value_*。

属性

  • sparse_value - 稀疏张量 :

    输出张量元素的稀疏格式值。

  • value - 张量 :

    输出张量元素的值。

  • value_float - 浮点数 :

    标量、float32 类型输出张量的唯一元素值。

  • value_floats - 浮点数数组 :

    1D、float32 类型输出张量的元素值。

  • value_int - 整型 :

    标量、int64 类型输出张量的唯一元素值。

  • value_ints - 整型数组 :

    1D、int64 类型输出张量的元素值。

  • value_string - 字符串 :

    标量、UTF-8 字符串类型输出张量的唯一元素值。

  • value_strings - 字符串数组 :

    1D、UTF-8 字符串类型输出张量的元素值。

输出

  • 输出 (异构) - T

    包含所提供张量相同值的输出张量。

类型约束

  • T 在 ( tensor(bfloat16), tensor(bool), tensor(complex128), tensor(complex64), tensor(double), tensor(float), tensor(float16), tensor(float8e4m3fn), tensor(float8e4m3fnuz), tensor(float8e5m2), tensor(float8e5m2fnuz), tensor(int16), tensor(int32), tensor(int4), tensor(int64), tensor(int8), tensor(string), tensor(uint16), tensor(uint32), tensor(uint4), tensor(uint64), tensor(uint8) )

    将输入和输出类型限制为所有张量类型。

Constant - 19

版本

  • 名称: Constant (GitHub)

  • : main

  • since_version: 19

  • 函数: False

  • 支持级别: SupportType.COMMON

  • 形状推断: True

此版本的操作符自 版本 19 起可用。

总结

此操作符生成一个常量张量。必须且只能指定提供的属性中的一个,即 value、sparse_value 或 value_*。

属性

  • sparse_value - 稀疏张量 :

    输出张量元素的稀疏格式值。

  • value - 张量 :

    输出张量元素的值。

  • value_float - 浮点数 :

    标量、float32 类型输出张量的唯一元素值。

  • value_floats - 浮点数数组 :

    1D、float32 类型输出张量的元素值。

  • value_int - 整型 :

    标量、int64 类型输出张量的唯一元素值。

  • value_ints - 整型数组 :

    1D、int64 类型输出张量的元素值。

  • value_string - 字符串 :

    标量、UTF-8 字符串类型输出张量的唯一元素值。

  • value_strings - 字符串数组 :

    1D、UTF-8 字符串类型输出张量的元素值。

输出

  • 输出 (异构) - T

    包含所提供张量相同值的输出张量。

类型约束

  • T 在 ( tensor(bfloat16), tensor(bool), tensor(complex128), tensor(complex64), tensor(double), tensor(float), tensor(float16), tensor(float8e4m3fn), tensor(float8e4m3fnuz), tensor(float8e5m2), tensor(float8e5m2fnuz), tensor(int16), tensor(int32), tensor(int64), tensor(int8), tensor(string), tensor(uint16), tensor(uint32), tensor(uint64), tensor(uint8) )

    将输入和输出类型限制为所有张量类型。

Constant - 13

版本

  • 名称: Constant (GitHub)

  • : main

  • 起始版本: 13

  • 函数: False

  • 支持级别: SupportType.COMMON

  • 形状推断: True

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

总结

此操作符生成一个常量张量。必须且只能指定提供的属性中的一个,即 value、sparse_value 或 value_*。

属性

  • sparse_value - 稀疏张量 :

    输出张量元素的稀疏格式值。

  • value - 张量 :

    输出张量元素的值。

  • value_float - 浮点数 :

    标量、float32 类型输出张量的唯一元素值。

  • value_floats - 浮点数数组 :

    1D、float32 类型输出张量的元素值。

  • value_int - 整型 :

    标量、int64 类型输出张量的唯一元素值。

  • value_ints - 整型数组 :

    1D、int64 类型输出张量的元素值。

  • value_string - 字符串 :

    标量、UTF-8 字符串类型输出张量的唯一元素值。

  • value_strings - 字符串数组 :

    1D、UTF-8 字符串类型输出张量的元素值。

输出

  • 输出 (异构) - T

    包含所提供张量相同值的输出张量。

类型限制

  • T 在 ( 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) )

    将输入和输出类型限制为所有张量类型。

Constant - 12

版本

  • 名称: Constant (GitHub)

  • : main

  • 起始版本: 12

  • 函数: False

  • 支持级别: SupportType.COMMON

  • 形状推断: True

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

摘要

此操作符生成一个常量张量。必须且只能指定提供的属性中的一个,即 value、sparse_value 或 value_*。

属性

  • sparse_value - 稀疏张量 :

    输出张量元素的稀疏格式值。

  • value - 张量 :

    输出张量元素的值。

  • value_float - 浮点数 :

    标量、float32 类型输出张量的唯一元素值。

  • value_floats - 浮点数数组 :

    1D、float32 类型输出张量的元素值。

  • value_int - 整型 :

    标量、int64 类型输出张量的唯一元素值。

  • value_ints - 整型数组 :

    1D、int64 类型输出张量的元素值。

  • value_string - 字符串 :

    标量、UTF-8 字符串类型输出张量的唯一元素值。

  • value_strings - 字符串数组 :

    1D、UTF-8 字符串类型输出张量的元素值。

输出

  • 输出 (异构) - T

    包含所提供张量相同值的输出张量。

类型限制

  • T 在 ( 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) )

    将输入和输出类型限制为所有张量类型。

Constant - 11

版本

  • 名称: Constant (GitHub)

  • : main

  • 起始版本: 11

  • 函数: False

  • 支持级别: SupportType.COMMON

  • 形状推断: True

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

摘要

一个常量张量。必须且只能指定 value 或 sparse_value 这两个属性中的一个。

属性

  • sparse_value - 稀疏张量 :

    输出张量元素的稀疏格式值。

  • value - 张量 :

    输出张量元素的值。

输出

  • 输出 (异构) - T

    包含所提供张量相同值的输出张量。

类型约束

  • T 在 ( 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) )

    将输入和输出类型限制为所有张量类型。

Constant - 9

版本

  • 名称: Constant (GitHub)

  • : main

  • 起始版本: 9

  • 函数: False

  • 支持级别: SupportType.COMMON

  • 形状推断: True

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

摘要

一个常量张量。

属性

  • value - 张量 (必填)

    输出张量元素的值。

输出

  • 输出 (异构) - T

    包含所提供张量相同值的输出张量。

类型限制

  • T 在 ( 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) )

    将输入和输出类型限制为所有张量类型。

Constant - 1

版本

  • 名称: Constant (GitHub)

  • : main

  • 起始版本: 1

  • 函数: False

  • 支持级别: SupportType.COMMON

  • 形状推断: True

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

摘要

一个常量张量。

属性

  • value - 张量 (必填)

    输出张量元素的值。

输出

  • 输出 (异构) - T

    包含所提供张量相同值的输出张量。

类型限制

  • T 在 ( tensor(double), tensor(float), tensor(float16) )

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