查看此页

展开

展开 - 13

  • 版本

  • 名称: Expand (GitHub)

  • : main

  • 起始版本: 13

  • 函数: False

  • 支持级别: SupportType.COMMON

形状推断: True

此版本算子自 **版本 13** 起可用。

概述

按照给定的形状和广播规则广播输入张量。广播规则类似于 numpy.array(输入) * numpy.ones(形状):维度右对齐;两个对应的维度必须具有相同的值,或者其中一个等于 1。此外,此算子类似于 numpy.broadcast_to(输入, 形状),但主要区别在于 numpy.broadcast_to() 不允许形状小于 input.size()。输出的形状(output.shape)可能不等于给定的形状(shape),这发生在形状中的某些维度等于 1,或者形状的维度数(shape.ndim)小于输入的维度数(input.shape.ndim)时。

  • 输入

    输入 (异构) - **T**

  • 输入张量

    形状 (异构) - **tensor(int64)**

一个一维张量,指示您想要扩展到的形状,遵循广播规则

  • 输出

    输出 (异构) - **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) ) 中

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

展开 - 8

  • 版本

  • 名称: Expand (GitHub)

  • 版本

  • 起始版本: 13

  • 函数: False

  • 支持级别: SupportType.COMMON

起始版本: 8

此版本算子自 **版本 8** 起可用。

概述

概述

  • 输入

    输入 (异构) - **T**

  • 输入张量

    形状 (异构) - **tensor(int64)**

输入

  • 输出

    输出 (异构) - **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) ) 中