当前位置:网站首页>Pytoch Learning Series: Introduction
Pytoch Learning Series: Introduction
2022-06-29 02:34:00 【luanhz】
Reading guide
In the new year, we still need to get better , This official account has been silent for nearly two months before and after the festival , I haven't updated the original tweet for a long time , I feel I can't degenerate like this anymore . So I've been thinking about what to tweet : It should meet the needs of the current work , Forced growth ; It should also be beneficial to the readers , Instead of simply marketing operations .
therefore , Finally decided “ Meddle in ” In depth learning direction , And I plan to update it first Pytorch Study the tutorial . Of course , This will be a series .
torch, Original intention “ torch ”
mention Pytorch We have to start with deep learning . All those engaged in data related positions know , Deep learning is a sub direction of machine learning , It is mainly based on neural network , Through flexible combination of a certain number of layers of network to achieve specific model functions , Especially good at computer vision (CV) And natural language processing (NLP) Direction . Its development history , After two highs and two lows , At present, it is in the third booming period of rapid development .
Net diagram , Invasion and deletion
here , The depth of in-depth learning is mainly reflected in the number of model layers , So called “ deep ”; But there is an important assumption hidden here , That is, the models constructed take neurons as the smallest unit of the network , So strictly speaking, it should be called deep learning based on neural network . natural , It can also not be based on neural network , For example, zhouzhihua team explored and proposed a deep random forest model a few years ago , It can be said to be a new research idea of deep learning .
From theoretical research to industrial application , Among them, there must be mature industrial realization . With python Language is the foundation , For the classical machine learning model , Then everyone must know scikit-learn; And when it comes to deep learning , The corresponding tool kit is less “ Centralization and unification ”, It can even be called the place of big factory disputes . among , The most representative and widely used is TensorFlow and Pytorch, The former comes from google, The latter comes from Facebook; The former is mainly used in industry , The latter is popular in academia . Of course , In terms of academia or industry , There is no clear boundary between the two .
At first , In learning TensorFlow Widely used in industry , And I have long been far away from colleges and universities, so I went directly into the pit TensorFlow, For a while TF boy, Especially knowing that TensorFlow2.0 Overcome the early 1.0 The version has been criticized for its static graph problem , So I don't think TensorFlow What are the disadvantages . But later , With the deepening of learning , In addition, through the understanding of surrounding colleagues , Find out Pytorch It has more excellent characteristics : For example, with Numpy The design of is closer to , The grammar style is more Pythonic wait . therefore , The individual is also decisive to turn to Pytorch camp .
This paper is the first one , Just to introduce Pytorch Can do , And personal understanding of why it is so designed .
Torch It is an old-fashioned deep learning framework , It was based on lua Language development , Because of the minority of its development language , So its development and application are also subject to many restrictions . since Facebook Open source Python Ecosphere Torch tool kit ——Pytroch after , It has always been a match TensorFlow A heavyweight tool for . at present Pytroch stay GitHub Get on 54k star(TensorFlow Currently in GitGHub Get on 163k star, The gap is still large , There are about 3 Twice as many ).
It is precisely because the most extensive stage of in-depth learning lies in the application direction of image, voice and text , So with Pytorch Three supporting toolkits and a model service toolkit :
- torchvision
- torchtext
- torchaudio
Of course ,Pytorch It is still the foundation and core
As a deep learning toolkit ,Pytorch What can I do with it ? The official documents are quoted here to describe its location , Broadly speaking, it has two functions :
namely :
- Support GPU Accelerated Tensor Ability to calculate
- Deep neural network construction supporting automatic derivation
So here comes the question : All say Pytorch It is a deep learning tool , Why is its core function designed as the above two points ? Regarding this , Personal understanding is as follows :
firstly :Tensor It is the foundation of deep learning model construction and training , Its status is like array To Numpy、DataFrame To Pandas, It is itself a data structure , But it constitutes Pytorch The soul of . here ,Tensor The original meaning of English is “ tensor ”, In fact, it corresponds to a multidimensional array , Essentially follow numpy Of ndarray It's consistent .
From this point of view ,Pytorch It can be seen as numpy Upgraded version , The upgrade here is mainly reflected in the availability of GPU Powerful parallel computing power . If there is Numpy Basics , Study Pytorch It can be very simple ; On the other hand , learn Pytorch It can also be regarded as right Numpy A supplement to , Regardless of the purpose of building a deep learning model .
second :Pytorch Positioned as a deep learning tool , Its main function is to support the construction and training of deep learning model . meanwhile , Different from the mature models in classical machine learning , Most deep learning networks have no fixed model or paradigm , Generally, it is composed of multiple basic modules flexibly matched by users ( Of course , In fact, there are some mature models , for example LeNet-5、AlexNet and VGGNet etc. , But more generally, users still need to customize themselves ), therefore Pytorch The support for deep learning does not lie in how many mature models are integrated , Instead, it provides a basic deep learning module , These are like scaffolding , It can be combined and matched arbitrarily , So as to realize more free and customized functions .
Pytorch The functions are rich and complicated , The best learning platform is to consult its official documents ,https://pytorch.org/. From the Pytroch The universality of the group , At present, its documents support multiple languages , Including Chinese documents , This also provides more channels for self scholars to get started quickly . I personally benefited from it , Subsequent tweets will also use this as an important reference framework .
So much for this tweet , Benchmarking goes from tool introduction to model modeling , The following articles will be updated every week Pytorch Learn a series of tweets .
边栏推荐
猜你喜欢

EMC、EMI、EMS的关系

Trigonometric function calculation

三角函数计算

pvcreate asm disk导致asm磁盘组异常恢复---惜分飞

MySQL的下载和安装

"The first share of endoscope" broke into IPO two times. Last year, it lost 500million yuan. The commercialization of core products is still in doubt | IPO Express

What is the Valentine's Day gift given by the operator to the product?

Some tests on complementary wasm environment

Target detection - ADAS practice

兰宝传感科技冲刺科创板:年营收3.5亿 许永童家族色彩浓厚
随机推荐
字符串分段组合
Ctfhub web password weak password
Google Borg paper
CTFHub-Web-密码口令-默认口令
Which brokerage is safer and more convenient to open an account for compass mobile stock?
[network communication learning notes] socket IO setup and deployment
Eliminate the hover effect when the button is disabled
月薪没到30K的程序员必须要背的面试八股,我先啃为敬
Download and installation of MySQL
Convert flat structure to tree structure
字符串属性练习
信息学奥赛一本通 1361:产生数(Produce) | 洛谷 P1037 [NOIP2002 普及组] 产生数
瀑布型项目管理最常用的10个小工具,可以自由搭建使用
Today's sleep quality record 82 points
What is the Valentine's Day gift given by the operator to the product?
How to use project Gantt chart to make project report
安装mysql5.7 并修改密码
QT basics tutorial: data types and containers
Have you learned the common SQL interview questions on the short video platform?
China's flexible employment has reached 200million