昇腾社区首页
中文
注册
开发者
下载

(beta)torch_npu.npu_transpose

产品支持情况

产品 是否支持
[object Object]Atlas A3 训练系列产品[object Object]
[object Object]Atlas A2 训练系列产品[object Object]
[object Object]Atlas 推理系列产品[object Object]
[object Object]Atlas 训练系列产品[object Object]

功能说明

返回原始张量视图,其维度已permute,结果连续。支持FakeTensor模式。

函数原型

[object Object]

参数说明

  • self (Tensor):输入张量。
  • perm (List[int]):对应维度排列。
  • require_contiguous (bool):用户是否需要对输入Tensor做转连续,默认值为True。设置为False时,表示不对输入Tensor做转连续。当用户明确输入Tensor为连续Tensor或转置Tensor时,才能设置为True。

调用示例

[object Object]