当前位置:网站首页>Huawei modelarts training alexnet model
Huawei modelarts training alexnet model
2022-07-01 07:20:00 【Flower boy】
One 、 Reference material
Two 、 Key steps
2.1 Upload Source code To obs
.
|-- dataset # Data sets
| |-- train
| `-- val `-- train
|-- data.py
|-- model.py
`-- train_npu.py # Startup file
2.2 obs Create directory
obs Directory structure
log: Log storage path
output: Training output path

2.3 Create algorithm
Algorithm management
---》 establish
name : Customize
describe : Customize
How it was created : Customize
AI engine :tensorflow_1.15-cann_5.0.3-py_3.7-euler_2.8.3-aarch64
Code directory :/xxx/alexnet/train/
Startup file :/xxx/alexnet/train/train_npu.py
Input data configuration : Dataset path
Mapping name : Customize ( The default can be )
Code path parameters :data_url
Output data configuration : Training output path
Mapping name : Customize ( The default can be )
Code path parameters :train_url
other : The default can be

2.4 Create training assignments
Training management
---》 Training assignment
---》 establish
name : Customize
describe : Customize
Algorithm :
---》 My algorithm
---》 Check the algorithm just created
Training input :
---》data_url:/xxx/alexnet/dataset/
Training output :
---》train_url:/xxx/alexnet/output/
Resource pool : According to the actual demand
The resource type :Ascend
specifications : According to the actual demand
Calculate the number of nodes : According to the actual demand
Job log path :/xxx/alexnet/log/

2.5 Training done

3、 ... and 、FAQ
Q:The input shape of GeOp5_0 is dynamic
File "/home/ma-user/modelarts/user-job-dir/train/train_npu.py", line 114, in main
test_loss, test_acc, summary = sess.run([cost, accuracy, summary_op], feed_dict=val_feed)
File "/home/ma-user/anaconda/lib/python3.7/site-packages/tensorflow_core/python/client/session.py", line 956, in run
run_metadata_ptr)
File "/home/ma-user/anaconda/lib/python3.7/site-packages/tensorflow_core/python/client/session.py", line 1180, in _run
feed_dict_tensor, options, run_metadata)
File "/home/ma-user/anaconda/lib/python3.7/site-packages/tensorflow_core/python/client/session.py", line 1359, in _do_run
run_metadata)
File "/home/ma-user/anaconda/lib/python3.7/site-packages/tensorflow_core/python/client/session.py", line 1384, in _do_call
raise type(e)(node_def, op, message)
tensorflow.python.framework.errors_impl.InternalError: The input shape of GeOp5_0 is dynamic, please ensure that npu option[dynamic_input] is set correctly, for more details please refer to the migration guide.
[[{
{
node GeOp5_0}}]]
The reason for the error :
There are inputs during model training shape Problem of change
terms of settlement :
train_npu.py Add
custom_op.parameter_map["dynamic_input"].b = True
custom_op.parameter_map["dynamic_graph_execute_mode"].s = tf.compat.as_bytes("lazy_recompile")
边栏推荐
- 女生适合学产品经理吗?有什么优势?
- Will Internet talents be scarce in the future? Which technology directions are popular?
- 比赛即实战!中国软件杯发布全新产业创新赛项,校企可联合参赛
- 图像风格迁移 CycleGAN原理
- [programming training 2] sorting subsequence + inverted string
- 组件的自定义事件①
- 盘点华为云GaussDB(for Redis)六大秒级能力
- STM32F1与STM32CubeIDE编程实例-NEC协议红外接收与解码
- C# Newtonsoft. Use of job in JSON
- How to draw a product architecture diagram?
猜你喜欢

如何制作专属的VS Code主题

Fix the problem that the AI video intelligent platform easycvr device video cannot be played

【MATLAB】求解非线性规划

【LINGO】求七个城市最小连线图,使天然气管道价格最低

【LINGO】求解二次规划

Félicitations pour l'inscription réussie de wuxinghe

Redisson utilise la solution complète - redisson Documents officiels + commentaires (Partie 1)

ctfshow-web351(SSRF)

C# Newtonsoft.Json中JObject的使用

Système de gestion de l'exploitation et de l'entretien, expérience d'exploitation humanisée
随机推荐
The game is real! China software cup releases a new industrial innovation competition, and schools and enterprises can participate in it jointly
[the path of system analysts] Chapter 5: software engineering of double disk (reverse clean room and Model Driven Development)
DC-4靶机
Vscode automatically formats code according to eslint specification
Programming examples of stm32f1 and stm32subeide infrared receiving and decoding of NEC protocol
【Flutter 问题系列第 72 篇】在 Flutter 中使用 Camera 插件拍的图片被拉伸问题的解决方案
比赛即实战!中国软件杯发布全新产业创新赛项,校企可联合参赛
C# Newtonsoft.Json中JObject的使用
Is the account opening of GF Securities safe and reliable? How to open GF Securities Account
ctfhub-端口扫描(SSRF)
手机开户选哪个证券公司比较好,哪个更安全
Reply and explanation on issues related to "online training of network security education in 2022"
redisson使用全解——redisson官方文檔+注釋(上篇)
在长城证券上做基金定投安全吗?
MySQL and redis consistency solution
Summary of the concept and advantages of 5g massive MIMO
MySQL table partition creation method
Those high-frequency written tests and interview questions in [Jianzhi offer & Niuke 101] - linked list
Operation and maintenance management system, humanized operation experience
kdtree(kd树)笔记