当前位置:网站首页>Developers share the initial experience of tinyms, a high-level API tool of mindspire!
Developers share the initial experience of tinyms, a high-level API tool of mindspire!
2022-07-18 22:24:00 【Shengsi mindspire】

CloudIDE
First , Ben lion believes that the universe is the most awesome IDE It must be VSCode , therefore , The cloud editors of many cloud vendors are based on VSCode Online Realization . Huawei cloud CloudIDE No exception .
CloudIDE It is a lightweight cloud native WebIDE, Access the cloud development environment through the browser 、 Code writing 、 Compile debugging 、 Run Preview 、 Access code warehouse 、 Command line execution and other capabilities , At the same time, it supports rich plug-in extensions .
Online experience address :
https://devcloud.cn-north-4.huaweicloud.com/cloudide/trial
CloudIDE entrance :

CloudIDE example :

Go to any mountain and sing some songs , Now that we have arrived MindSpore Site , A first Python Environment .
Look at the environment configuration I use :

Look at it. Python edition :
[email protected]:~$ python --version
Python 3.7.0Barely satisfied MindSpore The recommended Python 3.7.5, At least the large version is the same .
install MindSpore
Is this interface very similar VSCode ? The terminal commands to walk :
pip install https://ms-release.obs.cn-north-4.myhuaweicloud.com/1.2.0-rc1/MindSpore/cpu/ubuntu_aarch64/mindspore-1.2.0rc1-cp37-cp37m-linux_aarch64.whl --trusted-host ms-release.obs.cn-north-4.myhuaweicloud.com -i https://pypi.tuna.tsinghua.edu.cn/simple
# Please refer to the installation guide below , Make sure installation dependencies and environment variables are configured correctly Relaxed Copy, A key to install , The image of Huawei cloud is used by default , Installation speed is faster .

Another line of code to check whether the installation is normal :

[email protected]:~$ python -c "import mindspore;print(mindspore.__version__)"
1.2.0-rc1Oh , Oh my god , Installation is so simple , So silky . I have to make complaints about it tf 1.15.0 Installation , This lion wasted more than an hour in vain , All kinds of misstatements .
Study MindSpore
As Copy Siege lions , The most powerful skill is nothing more than copy and paste , So we can directly clone MindSpore Of docs Warehouse :
git clone https://gitee.com/mindspore/docsOkay , The document is ready , The code also has , also .ipynb There are documents, too , Please start learning !
from quick_start.ipynb Start , To begin our MindSpore Learning journey !

CloudIDE Parsing is supported by default .ipynb file , Maybe I chose Python The development environment is automatically installed . This is a case of handwritten numeral recognition , function 1875 After step , The training results we got :
epoch: 1 step: 1872, loss is 0.08411364
epoch: 1 step: 1873, loss is 0.07816357
epoch: 1 step: 1874, loss is 0.026486307
epoch: 1 step: 1875, loss is 0.09032617
{'Accuracy': 0.9582331730769231}I have to sigh , The arrival of the cloud age , It brings us too much convenience .
But so far MindSpore Most of the new features focus on GPU and Ascend Environmental Science , Therefore, this article does not do too much experience . Digression , Want to experience TinyMS , Only for the time being MindSpore 1.1.1 Support :

TinyMS Document address : https://tinyms.readthedocs.io/zh_CN/latest/index.html
Experience TinyMS
reinstall MindSpore 1.1.1
pip install https://ms-release.obs.cn-north-4.myhuaweicloud.com/1.1.1/MindSpore/cpu/ubuntu_aarch64/mindspore-1.1.1-cp37-cp37m-linux_aarch64.whl --trusted-host ms-release.obs.cn-north-4.myhuaweicloud.com -i https://pypi.tuna.tsinghua.edu.cn/simpleinstall TinyMS
pip install tinymsVerify the installation :
import tinyms as ts
from tinyms.primitives import tensor_add
x = ts.ones([2, 3])
y = ts.ones([2, 3])
print(tensor_add(x, y))
Proper ! The next step is to follow the official documents ,「 Implement a graphic classification application in one minute 」!
Is still Lenet Handwritten digit recognition , We can use the previous data set , You can also download again , It takes a little longer to download again . But the use of CloudIDE You should pay attention to folder permissions , We will use /root Replace with ./data, Avoid the problem of insufficient folder permissions .

Then there is the training model ( The operation is always surprisingly similar , Also modified the file path ):

Wait until after training , Prepare for reasoning ,TinyMS Reasoning is C/S(Client/Server) framework .TinyMS Use Flask This lightweight web server architecture acts as C/S Communication infrastructure .
……
When I'm looking forward to trying reasoning deployment , Find out servable_path Cannot customize for the time being , When I call list_servables() when , Because in CloudIDE There is no permission to write files to /etc Such as catalog , Therefore, I can't read my definition servable.json. The experience comes to an end !

Later I will try in Linux Experience again on ! At the same time, we also look forward to the future TinyMS It can support more free configuration .

TinyMS Designed to be based on MindSpore Provide simple and effective high-order API、 Low running cost 、 Modular development and agile deployment . Compared with other high-level enterprises in the market API project ,TinyMS Focus on improving developers' understanding of the existing framework, that is MindSpore Using experience of , Especially for the development and deployment of the whole scene .
边栏推荐
- 看完这篇 教你玩转渗透测试靶机vulnhub——EvilBox-One
- Which brand of Bluetooth headset has good noise reduction? Top 10 active noise reduction headphones
- Towhee daily model weekly report
- 技术干货| MindSpore新一代自主研发分子模拟库:Mind-Sponge
- 1302_ Analysis of design and implementation of coroutine in FreeRTOS
- ThoughtWorks modern enterprise architecture framework white paper notes
- information gathering
- Stream - elegant handling of collection elements
- Flutter is stuck in running gradle task 'assemblydebug' Solution of
- SCI paper submission process
猜你喜欢

new操作符具体做了什么,面试

Cmu15445 (fall 2019) project 4 - logging & Recovery details

Arduino窗口乱码问题

Practical application of machine learning: quickly brush five machine learning problems of Niuke

Swin transformer, the best paper model of iccv 2021, finally started with video!

How to return to the hyperlink in PDF after jumping? alt + ←

Definition and usage of several special standards of C language

技術幹貨| MindSpore新一代自主研發分子模擬庫:Mind-Sponge
![[UCOS III source code analysis] - semaphore](/img/99/d0c09ff354ad8226512659fd012442.png)
[UCOS III source code analysis] - semaphore

信息系统项目管理师必背核心考点(四十四)规划风险应对
随机推荐
Timesformer: can you understand video by transformer alone? Another attack of attention mechanism!
KDD 2017 | metapath2vec:异质图的可扩展表示学习
Network infrastructure VLAN configuration trunk Technology (ENSP, Cisco)
alicloud3搭建wordpress
How do top enterprises such as Starbucks, Coca Cola and apple carry out brand marketing
技术干货| MindSpore新一代自主研发分子模拟库:Mind-Sponge
Towhee daily model weekly report
看完这篇 教你玩转渗透测试靶机vulnhub——EvilBox-One
RPA ecosystem revealed, supporting the life source of RPA enterprises' billions of valuation
Accessing local variables in anonymous inner classes
J-dict-select-tag drop-down box failure solution
Visual Studio 生产环境配置方案:SlowCheetah
ICCV 2021 的最佳论文模型 Swin Transformer 终于对视频下手了!
Huawei od JS splicing URL
华为 od js 拼接URL
js 手写sort
Win11预览版更新错误怎么办?Win11预览版安装失败的解决方法
操作dom逆序,面试题
An error is reported when viewing the service status inside the container: failed to get D-Bus connection: operation not allowed
Shuan Q, Dachang was forced to graduate and recited eight part essay for a month without a window. Fortunately, he got an offer