---
title: 应用调试
description: "运行应用的步骤，请参考基于Caffe ResNet-50网络实现图片分类（同步推理）(https://gitee.com/ascend/samples/tree/master/python/level2_simple_inference/1_classification/resnet50_imagenet_classification)。"
url: https://www.hiascend.com/document/detail/zh/canncommercial/latest/programug/acldevg/aclpythondevg_0080.html
sourcePath: /source/zh/canncommercial/900/programug/acldevg/aclpythondevg_0080.html
indexId: ac0813a3c13f20516bc792e3236ee167d2389728b50709fae6250d956d942f9571
---
# 应用调试

#### 运行应用

运行应用的步骤，请参考基于Caffe ResNet-50网络实现图片分类（同步推理）(https://gitee.com/ascend/samples/tree/master/python/level2_simple_inference/1_classification/resnet50_imagenet_classification)。

相关注意点如下：

1. 模型转换，详细说明请参见《ATC离线模型编译工具(https://www.hiascend.com/document/detail/zh/canncommercial/900/devaids/atctool/atlasatc_16_0001.html)》。
2. 运行时，需将初始化配置文件（acl.json）所在的目录、测试图片所在的目录、*.om文件所在的目录都上传到Host的同一个目录下。
  如果在初始化阶段，在acl.init(https://www.hiascend.comdocument/detail/zh/canncommercial/900/API/runtimeapi/aclpythondevg_01_0005.html)接口中不传入参数，则无需将初始化配置文件（acl.json）所在的目录上传到Host。

3. 运行代码时，直接运行对应的Python脚本即可。如：

```
python3 main.py
```


#### 问题定位

运行应用时如果出错，您可以参见《日志参考(https://www.hiascend.com/document/detail/zh/canncommercial/900/maintenref/logreference/logreference_0001.html)》获取日志文件，以便查看日志文件中详细报错。根据报错初步定位后：

- 如果是接口约束导致接口调用逻辑不对，需查看总体的  使用约束
以及各接口本身的约束，再调整接口调用逻辑。
