Upsample

Upsample - 10

版本

  • 名称: Upsample (GitHub)

  • : main

  • since_version: 10

  • 函数: False

  • 支持级别: SupportType.COMMON

  • 形状推断: True

此版本的操作符自版本10起已弃用

摘要

对输入张量进行上采样。输出张量的每个维度值为:output_dimension = floor(input_dimension * scale)。

属性

  • 模式 - 字符串 (默认为 'nearest')

    两种插值模式:nearest(最近邻,默认)和 linear(线性,包括双线性、三线性等)

输入

  • X (异构) - T

    N维张量

  • 尺度 (异构) - 张量(浮点)

    沿每个维度的尺度数组。其取值大于或等于1。'scales' 的元素数量应与输入 'X' 的秩相同。

输出

  • Y (异构) - T

    调整大小后的N维张量

类型约束

  • 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) )

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

Upsample - 9

版本

  • 名称: Upsample (GitHub)

  • : main

  • 起始版本: 9

  • 函数: False

  • 支持级别: SupportType.COMMON

  • 形状推断: True

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

摘要

对输入张量进行上采样。输出张量的每个维度值为:output_dimension = floor(input_dimension * scale)。

属性

  • 模式 - 字符串 (默认为 'nearest')

    两种插值模式:nearest(最近邻,默认)和 linear(线性,包括双线性、三线性等)

输入

  • X (异构) - T

    N维张量

  • 尺度 (异构) - 张量(浮点)

    沿每个维度的尺度数组。其取值大于或等于1。'scales' 的元素数量应与输入 'X' 的秩相同。

输出

  • Y (异构) - T

    调整大小后的N维张量

类型约束

  • 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) )

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

Upsample - 7

版本

  • 名称: Upsample (GitHub)

  • : main

  • 起始版本: 7

  • 函数: False

  • 支持级别: SupportType.COMMON

  • 形状推断: True

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

摘要

对输入张量进行上采样。输出张量的每个维度值为:output_dimension = floor(input_dimension * scale)。

属性

  • 模式 - 字符串 (默认为 'nearest')

    两种插值模式:nearest(最近邻,默认)和 linear(线性,包括双线性、三线性等)

  • 尺度 - 浮点型 (必需)

    沿每个维度的尺度数组。其取值大于或等于1。'scales' 的元素数量应与输入 'X' 的秩相同。

输入

  • X (异构) - T

    N维张量

输出

  • Y (异构) - T

    调整大小后的N维张量

类型约束

  • 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) )

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

Upsample - 1

版本

  • 名称: Upsample (GitHub)

  • : main

  • 起始版本: 1

  • 函数: False

  • 支持级别: SupportType.EXPERIMENTAL

  • 形状推断: False

实验性操作符不维护版本。

摘要

对输入张量进行上采样。输出张量的宽度和高度为:output_width = floor(input_width * width_scale), output_height = floor(input_height * height_scale)。示例:给定 data 张量、width_scale、height_scale、mode,以最近邻模式对输入的4维张量进行上采样:data = [[[ [1, 2], [3, 4] ]]] width_scale = 2 height_scale = 2 mode = “nearest” output = [[[ [1, 1, 2, 2], [1, 1, 2, 2], [3, 3, 4, 4], [3, 3, 4, 4] ]]]

属性

  • 高度尺度 - 浮点型 (必需)

    沿高度维度的尺度。其取值大于或等于1。

  • 模式 - 字符串 (默认为 'nearest')

    两种插值模式:nearest(最近邻,默认)、bilinear(双线性)

  • 宽度尺度 - 浮点型 (必需)

    沿宽度维度的尺度。其取值大于或等于1。

输入

  • X (异构) - T

    4维张量,[N,C,H,W]

输出

  • Y (异构) - T

    调整大小后的4维张量,[N,C,H,W]

类型约束

  • T 包含 ( tensor(bool), tensor(double), tensor(float), tensor(float16), tensor(int32), tensor(int64) )

    将输出类型限制为布尔型、int32、int64、float16、float、双精度张量。