---
title: PyTorch模型训练时，AsStrided算子报错“the output element is out of input range”-Atlas Community
description: 将GitHub上的VoicePrintRecognition-PyTorch模型迁移至昇腾上训练时，报错“Compile op[AsStrided] failed.Please check op’s compilation error message”；  查看device日志，错误显示“OpName:[AsStrided] “the output element is out of range!
keywords: --
url: https://www.hiascend.com/document/caselibrary/detail/case_9543
section: (其他)
---

# PyTorch模型训练时，AsStrided算子报错“the output element is out of input range”-Atlas Community

URL: https://www.hiascend.com/document/caselibrary/detail/case_9543
描述: 将GitHub上的VoicePrintRecognition-PyTorch模型迁移至昇腾上训练时，报错“Compile op[AsStrided] failed.Please check op’s compilation error message”；  查看device日志，错误显示“OpName:[AsStrided] “the output element is out of range!
关键词: --

昇腾文档 [了解详情](https://www.hiascend.com/document)

故障案例 [了解详情](https://www.hiascend.com/document/caselibrary)

PyTorch模型训练时，AsStrided算子报错“the output element is out of input range”

PyTorch模型训练时，AsStrided算子报错“the output element is out of input range”

2024/02/21

789

No rating yet

Rate This Document

问题信息

| 问题来源 | 产品大类 | 产品子类 | 关键字 |
| --- | --- | --- | ---|
| 官方 | 模型训练 | PyTorch | -- |

#### 问题现象描述

- 硬件配置：

- 问题现象：

将GitHub上的VoicePrintRecognition-PyTorch模型迁移至昇腾上训练时，报错“Compile op[AsStrided] failed.Please check op’s compilation error message”；

查看device日志，错误显示“OpName:[AsStrided] “the output element is out of range!””。

#### 原因分析

1. AsStrided算子编译时，对输入输出shape校验时失败。
2. 模型中使用了生成负数算子torch.complex64接口。

#### 解决措施

1. 设置环境变量，用于优化非连续两个算子组合类场景。

```
export COMBINED_ENABLE=1
```

本页内容

- 问题信息
- 问题现象描述
- 原因分析
- 解决措施
