当前位置:网站首页>Replicate swin on Huawei ascend910_ transformer
Replicate swin on Huawei ascend910_ transformer
2022-07-25 16:51:00 【Flower boy】
One 、 Running environment
Hardware platform
[ma-user swin_transformer]$export -p
declare -x AICPU_FLAG="1"
declare -x ANACONDA_DIR="/home/ma-user/anaconda3"
declare -x ASCEND_AICPU_PATH="/usr/local/Ascend/nnae/latest/"
declare -x ASCEND_HOME="/usr/local/Ascend"
declare -x ASCEND_OPP_PATH="/usr/local/Ascend/nnae/latest/opp"
declare -x CONDA3_DIR="/opt/conda/bin"
declare -x CONDA_DIR="/opt/conda"
declare -x CPU_LIMIT="24.0"
declare -x CREDENTIAL_PROFILES_FILE="/etc/secret-volume/credentials"
declare -x FWK_PYTHON_PATH="/usr/local/Ascend/nnae/latest/fwkacllib/python/site-packages"
declare -x GATEWAY_IMAGE_ID=""
declare -x HOME="/home/ma-user"
declare -x JUPYTER_SERVER_ROOT="/home/ma-user/work"
declare -x LD_LIBRARY_PATH="/usr/lib/aarch64-linux-gnu/hdf5/serial:/usr/local/Ascend/nnae/latest/fwkacllib/lib64:/usr/local/Ascend/driver/lib64/common/:/usr/local/Ascend/driver/lib64/driver:/usr/lib64"
declare -x LESSOPEN="||/usr/bin/lesspipe.sh %s"
declare -x LINES="40"
declare -x LOGNAME="ma-user"
declare -x ME_TBE_PLUGIN_PATH="/usr/local/Ascend/opp/framework/built-in/tensorflow/"
declare -x MINICONDA_DIR="/opt/conda"
declare -x MODELARTS_SDK_VERSION="1.1.5"
declare -x MS_BUILD_PROCESS_NUM="20"
declare -x MindsporeEnv="MindSpore"
declare -x NOTEBOOK_IMAGE_NAME="notebook2.0-mul-kernel-arm-ascend-cp37"
declare -x NOTEBOOK_IMAGE_VERSION="3.3.3-c79-20220121"
declare -x OLDPWD="/home/ma-user"
declare -x OPTION_EXEC_EXTERN_PLUGIN_PATH="/usr/local/Ascend/fwkacllib/lib64/plugin/opskernel/libfe.so:/usr/local/Ascend/fwkacllib/lib64/plugin/opskernel/libaicpu_plugin.so:/usr/local/Ascend/fwkacllib/lib64/plugin/opskernel/librts_engine.so:/usr/local/Ascend/fwkacllib/lib64/plugin/opskernel/libge_local_engine.so"
declare -x PATH="/home/ma-user/.local/bin:/home/ma-user/bin:/usr/local/Ascend/nnae/latest/fwkacllib/ccec_compiler/bin:/usr/local/Ascend/nnae/latest/fwkacllib/bin:/home/ma-user/anaconda3/envs/MindSpore/bin:/opt/conda/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/home/ma-user/modelarts/ma-cli/bin"
declare -x PWD="/home/ma-user/work/swin_transformer"
declare -x PYTHONPATH="/usr/local/Ascend/nnae/latest/fwkacllib/python/site-packages:/usr/local/Ascend/nnae/latest/fwkacllib/python/site-packages/auto_tune.egg:/usr/local/Ascend/nnae/latest/fwkacllib/python/site-packages/schedule_search.egg:/usr/local/Ascend/tfplugin/latest/tfplugin/python/site-packages:/usr/local/Ascend/nnae/latest/opp/op_impl/built-in/ai_core/tbe"
declare -x RANK_TABLE_FILE="/user/config/nbstart_hccl.json"
declare -x REGION_NAME="cn-central-231"
declare -x SHELL="/bin/bash"
declare -x SOC_VERSION="Ascend910A"
declare -x TBE_IMPL_PATH="/usr/local/Ascend/nnae/latest/opp/op_impl/built-in/ai_core/tbe"
declare -x TERM="xterm"
declare -x TF_PLUGIN_PKG="/usr/local/Ascend/tfplugin/latest/tfplugin/python/site-packages"
declare -x TensorflowEnv="TensorFlow-1.15.0"
declare -x USER="ma-user"
declare -x USERNAME="ma-user"
declare -x XDG_CACHE_HOME="/home/ma-user/.cache"
Two 、 Related introduction
2.1 Related courses
2.2 Error code query
E60011 The value of some attributes must be within the specified range
2.3 Atlas Hardware product compatibility query
Calculate product compatibility query assistant
3、 ... and 、 Key steps
swin_transformer gitee Warehouse
ModelZoo:Swin-Transformer
Blogger's code :https://gitee.com/lljyoyo1995/swin_transformer
3.1 Resource usage
CPU Occupancy 
Resource usage 
NPU Occupancy 
NPU power 
Four 、FAQ
Q:MindSpore Version inconsistency results in API Interface error
[ERROR] MD(67033,fffea5ffb1e0,python):2022-07-20-17:51:48.714.669 [mindspore/ccsrc/minddata/dataset/util/task.cc:67] operator()] Task: MapOp(ID:3) - thread(281469171773920) is terminated with err msg: Unexpected error. map operation: [Decode] failed. Decode: invalid input shape, only support 1D input, got rank: 3
Line of code : 42
File : /home/jenkins/agent-working-dir/workspace/[email protected]/mindspore/mindspore/ccsrc/minddata/dataset/kernels/image/decode_op.cc
self.saved_output_shapes = runtime_getter[0].GetOutputShapes()
RuntimeError: Unexpected error. map operation: [Decode] failed. Decode: invalid input shape, only support 1D input, got rank: 3
Line of code : 42
File : /home/jenkins/agent-working-dir/workspace/[email protected]/mindspore/mindspore/ccsrc/minddata/dataset/kernels/image/decode_op.cc
The reason for the error :
MindSpore After the update , Part of the interface
terms of settlement :
1. Modify the package guide method
import mindspore.dataset.vision as vision
Change it to
import mindspore.dataset.vision.c_transforms as vision
import mindspore.dataset.vision.py_transforms as pvision
2. modify ToPIL() Interface
vision.ToPIL()
Change it to
pvision.ToPIL()
# Comment out Decode()
# vision.Decode()
[ERROR] MD(71480,fffe5f7fe1e0,python):2022-07-20-18:01:47.677.517 [mindspore/ccsrc/minddata/dataset/util/task.cc:67] operator()] Task: MapOp(ID:3) - thread(281467988992480) is terminated with err msg: Unexpected error. map operation: [Normalize] failed. Normalize: number of channels does not match the size of mean and std vectors, got channels: 224, size of mean:3
Line of code : 810
File : /home/jenkins/agent-working-dir/workspace/[email protected]/mindspore/mindspore/ccsrc/minddata/dataset/kernels/image/image_utils.cc
The reason for the error :
Normalize() Interface error
MindSpore Quick version update , The inconsistency between the old and new interfaces makes the source code unable to run
terms of settlement :
1. Modify the package guide method
import mindspore.dataset.transforms as C
import mindspore.dataset.vision as vision
Change it to
import mindspore.dataset.transforms.c_transforms as C
import mindspore.dataset.vision.c_transforms as vision
import mindspore.dataset.vision.py_transforms as pvision
2. modify Normalize() Interface
vision.Normalize(mean=mean, std=std)
Change it to
pvision.Normalize(mean=mean, std=std)
边栏推荐
- 7. Dependency injection
- 复旦大学EMBA同学同行专题:始终将消费者的价值放在最重要的位置
- From digitalization to intelligent operation and maintenance: what are the values and challenges?
- [xiao5 chat] check the official account < the service provided by the official account has failed, please wait a moment>
- Who moved my memory and revealed the secret of 90% reduction in oom crash
- easyui入门
- 测试框架-unittest-命令行操作、断言方法
- Baidu rich text editor ueeditor single image upload cross domain
- Outlook 教程,如何在 Outlook 中搜索日历项?
- Roson的Qt之旅#99 QML表格控件-TableView
猜你喜欢

Birui data joins Alibaba cloud polardb open source database community

3D semantic segmentation - scribed supervised lidar semantic segmentation

Frustrated Internet people desperately knock on the door of Web3

2D semantic segmentation -- deeplabv3plus reproduction

Fudan University EMBA peer topic: always put the value of consumers in the most important position

fastadmin tp 安装使用百度富文本编辑器UEditor

微信公众号开发之消息的自动回复

Exception handling mechanism topic 1

新增批量删除

HCIP笔记十二天
随机推荐
微信公众号开发之消息的自动回复
Various useful forms of London Silver K-line chart
失意的互联网人拼命叩开Web3大门
首页门户分类查询
Rebudget: balance efficiency and fairness in market-based multi-core resource allocation by reallocating the budget at run time
【obs】发送前丢帧及帧优先级
文字翻译软件-文字批量翻译转换器免费
[redis] redis installation
[OBS] frame loss and frame priority before transmission
【目标检测】TPH-YOLOv5:基于transformer的改进yolov5的无人机目标检测
[target detection] tph-yolov5: UAV target detection based on Transformer's improved yolov5
【小5聊】公众号排查<该公众号提供的服务出现故障,请稍后>
动态规划题目记录
Attachment handling of SAP Fiori
152. 乘积最大子数组
3D 语义分割——Scribble-Supervised LiDAR Semantic Segmentation
Roson的Qt之旅#100 QML四种标准对话框(颜色、字体、文件、提升)
【云驻共创】探秘GaussDB如何助力工商银行打造金融核心数据
Rainbond插件扩展:基于Mysql-Exporter监控Mysql
LVGL 7.11 tileview界面循环切换