当前位置:网站首页>Why is mindspore 1.5rcgraph mode slow to train?
Why is mindspore 1.5rcgraph mode slow to train?
2022-06-10 04:37:00 【MSofficial】
Problem description :
【 Background information 】
Whole Model It is a character recognition task , contain CNN,Transformer,Loss only one CrossEntropy The classification of loss.
【 Problem description 】
The whole code is already in PyNative Running smoothly in mode , And trained to a very high performance .
The training input is batchsize=64 Of 160x48 Pictures of the . The number of output categories is 7000 about .
Single card single machine ,PyNative Let's train , Every Batch The average need is 3 About seconds
Now take it PyNative Trained in mode Model,load After entering, switch to GRAPH Mode continue finetune, It is found that the accuracy is almost the same , No decline , But the speed is much slower ! Than PyNative Pattern , Every batch slow 10 Time is about... Times !
answer :
The graph should be compiled repeatedly ,dict,list,tuple Do not use them as input parameters to the root graph , because graph There is a compilation cache ,tensor As an input parameter , It's a shape and type As a key Of , Other types are to see object The properties and value Of , If you pass in a dict May cause some value It's changing all the time , As a result, the graph cannot be cached , Every step Are compiling drawings , Time will be greatly increased .
边栏推荐
- S series · add data to the text file without adding duplicate values
- MeterSphere | 超好用的开源测试平台
- Openjudge noi 1.13 14: find the 3 digits that meet the conditions
- ThreadLocal basic and advanced use
- 5 minutes to learn how to set up local pypi source
- Super easy to use chrome plug-in!
- Informatics Olympiad all in one 1279: [example 9.23] window layout | window layout of Luogu p1854 flower shop
- Pampy | 超强的模式匹配工具
- Test concept
- 【深度学习】《PyTorch入门到项目实战》(十一):卷积层
猜你喜欢

IO被谁吃了?
![[Android L]SEAndroid增强Androd安全性背景概要及带来的影响](/img/cf/591fc78cdf158b31fac86a092adc49.png)
[Android L]SEAndroid增强Androd安全性背景概要及带来的影响

Tcp/ip protocol (1)

Distributed loading model and incremental training on shengteng 910

Jenkinsclient | easy to use Jenkins client

Error of clip operator in mindconvert model transformation

S series · several postures for deleting folders

City / school / major, which is the most important when choosing a university| Daily anecdotes

Fastapi-15-file upload-3

昇腾910上分布式加载模型与增量训练
随机推荐
Pysimplegui classic practice: how to read this Chinese character?
TCP (sliding window, flow control)
Yyds dry goods inventory solution sword finger offer: rectangular coverage
Distributed data object: HyperTerminal 'global variable'
25. BOM事件
Mix sampling and loading with mindspire multiple datasets
ThreadLocal not yet? Come and have a look!
midway的使用教程
497. random points in non overlapping rectangles
MindSpore【数据集功能】无法查看数据集
[depth first search] toy snake: maze problem
25. Bom Event
Exemple de démarrage JDBC
FastApi-17-页面美化-2
Ammonium tech, a well-known network security hardware platform manufacturer, joined dragon lizard community
2022.5.23-----leetcode. six hundred and seventy-five
Full path of idea replication method
FastApi-16-页面美化-1
Mnemonic search + state compression leetcode four hundred and sixty-four
Gui编程学生成绩管理系统