上采样

上采样 - 10

版本

  • 名称: Upsample (GitHub)

  • 域名: main

  • since_version: 10

  • 函数: False

  • support_level: SupportType.COMMON

  • 形状推断: True

此版本的运算符自版本10起已被弃用。

摘要

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

属性

  • mode - STRING (默认为 'nearest'):

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

输入

  • X (异构) - T:

    N维张量

  • scales (异构) - tensor(float):

    每个维度上的缩放数组。它的值大于或等于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’限制为所有张量类型。

上采样 - 9

版本

  • 名称: Upsample (GitHub)

  • 域名: main

  • since_version: 9

  • 函数: False

  • support_level: SupportType.COMMON

  • 形状推断: True

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

摘要

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

属性

  • mode - STRING (默认是 'nearest'):

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

输入

  • X (异构) - T:

    N维张量

  • scales (异构) - tensor(float):

    每个维度上的缩放数组。它的值大于或等于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’限制为所有张量类型。

上采样 - 7

版本

  • 名称: Upsample (GitHub)

  • 域名: main

  • since_version: 7

  • 函数: False

  • support_level: SupportType.COMMON

  • 形状推断: True

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

总结

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

属性

  • mode - STRING (默认为 'nearest'):

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

  • scales - FLOATS (必填) :

    每个维度上的缩放数组。它的值大于或等于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) ):

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

上采样 - 1

版本

  • 名称: Upsample (GitHub)

  • 域名: main

  • since_version: 1

  • 函数: False

  • support_level: SupportType.EXPERIMENTAL

  • 形状推断: False

实验性操作未维护版本控制。

摘要

对输入张量进行上采样。 输出张量的宽度和高度为: output_width = floor(input_width * width_scale), output_height = floor(input_height * height_scale). 示例: 给定 data 张量,width_scale, height_scale, mode, 在最近邻模式下对输入4-D张量进行上采样: 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] ]]]

属性

  • height_scale - FLOAT (必填) :

    沿高度维度的比例。它取大于或等于1的值。

  • mode - STRING (默认是 'nearest'):

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

  • width_scale - FLOAT (必填) :

    沿宽度维度的比例。它取值大于或等于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、浮点型、双精度张量。