
# 日志提示"max_pool2d_with_indices_out_cuda_frame failed with error code 0"
#### 问题现象
pytroch1.3镜像中，去升级了pytroch1.4的版本，导致之前在pytroch1.3跑通的代码报错如下：
```
“RuntimeError:max_pool2d_with_indices_out_cuda_frame failed with error code 0”
```
#### 原因分析
出现该问题的可能原因如下：
pytorch1.4引擎与之前pytorch1.3版本兼容性问题。
#### 处理方法
1. 在images之后添加contiguous。
   ```
   images = images.cuda()  
   pred = model(images.permute(0, 3, 1, 2).contiguous())
   ```
   
2. 将版本回退至pytorch1.3。
3. 必现的问题，使用本地Pycharm远程连接Notebook调试。
 
#### 建议与总结
在创建训练作业前，推荐您先使用ModelArts开发环境调试训练代码，避免代码迁移过程中的错误。
- 直接使用线上notebook环境调试请参考[使用JupyterLab开发模型](https://support.huaweicloud.com/devtool-modelarts/devtool-modelarts_0012.html)。
- 配置本地IDE（Pycharm或者VSCode）连接云上环境调试请参考[使用本地IDE开发模型](https://support.huaweicloud.com/devtool-modelarts/devtool-modelarts_0019.html)。
 
