Constant

Constant - 25

版本

  • 名称: Constant (GitHub)

  • : main

  • since_version: 25

  • 函数: False

  • 支持级别: SupportType.COMMON

  • 形状推断: True

此版本的操作符已在版本 25 及之后可用。

摘要

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

属性

  • sparse_value - SPARSE_TENSOR :

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

  • value - TENSOR :

    输出张量元素的值。

  • value_float - FLOAT :

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

  • value_floats - FLOATS :

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

  • value_int - INT :

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

  • value_ints - INTS :

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

  • value_string - STRING :

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

  • value_strings - 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(int2), tensor(int32), tensor(int4), tensor(int64), tensor(int8), tensor(string), tensor(uint16), tensor(uint2), tensor(uint32), tensor(uint4), tensor(uint64), tensor(uint8) )

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

Constant - 24

版本

  • 名称: Constant (GitHub)

  • : main

  • 起始版本24

  • 函数: False

  • 支持级别: SupportType.COMMON

  • 形状推断: True

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

摘要

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

属性

  • sparse_value - SPARSE_TENSOR :

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

  • value - TENSOR :

    输出张量元素的值。

  • value_float - FLOAT :

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

  • value_floats - FLOATS :

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

  • value_int - INT :

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

  • value_ints - INTS :

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

  • value_string - STRING :

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

  • value_strings - 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 - SPARSE_TENSOR :

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

  • value - TENSOR :

    输出张量元素的值。

  • value_float - FLOAT :

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

  • value_floats - FLOATS :

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

  • value_int - INT :

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

  • value_ints - INTS :

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

  • value_string - STRING :

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

  • value_strings - 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 - SPARSE_TENSOR :

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

  • value - TENSOR :

    输出张量元素的值。

  • value_float - FLOAT :

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

  • value_floats - FLOATS :

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

  • value_int - INT :

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

  • value_ints - INTS :

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

  • value_string - STRING :

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

  • value_strings - 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 - SPARSE_TENSOR :

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

  • value - TENSOR :

    输出张量元素的值。

  • value_float - FLOAT :

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

  • value_floats - FLOATS :

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

  • value_int - INT :

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

  • value_ints - INTS :

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

  • value_string - STRING :

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

  • value_strings - 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 - SPARSE_TENSOR :

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

  • value - TENSOR :

    输出张量元素的值。

  • value_float - FLOAT :

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

  • value_floats - FLOATS :

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

  • value_int - INT :

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

  • value_ints - INTS :

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

  • value_string - STRING :

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

  • value_strings - 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 - SPARSE_TENSOR :

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

  • value - TENSOR :

    输出张量元素的值。

  • value_float - FLOAT :

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

  • value_floats - FLOATS :

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

  • value_int - INT :

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

  • value_ints - INTS :

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

  • value_string - STRING :

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

  • value_strings - 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 - SPARSE_TENSOR :

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

  • value - TENSOR :

    输出张量元素的值。

输出

  • 输出 (异构) - 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 - TENSOR (必填)

    输出张量元素的值。

输出

  • 输出 (异构) - 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 - TENSOR (必填)

    输出张量元素的值。

输出

  • 输出 (异构) - T

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

类型约束

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

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