Beginning Anomaly Detection Using


Intro to PyTorch: A Simple Classifier Model



Download 26,57 Mb.
Pdf ko'rish
bet87/283
Sana12.07.2021
Hajmi26,57 Mb.
#116397
1   ...   83   84   85   86   87   88   89   90   ...   283
Bog'liq
Beginning Anomaly Detection Using Python-Based Deep Learning

 Intro to PyTorch: A Simple Classifier Model

Now that you have a better idea of what a CNN is and how a classifier model looks like in 

Keras, let’s jump straight into implementing a CNN in PyTorch.

Figure 3-53.  The output of running the code in Figure 

3-52

Chapter 3   IntroduCtIon to deep LearnIng




112

PyTorch doesn’t abstract everything to the extent that Keras does, so there’s a bit 

more syntax involved. If you would like to explore this framework further, check out 

Appendix B, where we cover the basics of PyTorch, its functionality, and apply it to the 

models that you will explore in Chapter 

7

.



Just like in Keras, however, you start by importing the necessary modules and 

defining your hyperparameters (Figure 

3-54

).

In PyTorch, you must specify to torch that you want to use the GPU if it exists. In 



Keras, since you are using tensorflow-gpu as the back end (what Keras runs on top of), it 

is expected that you have a GPU, CUDA, and cuDNN installed.

Now configure your hyperparameters (Figure 

3-55


).


Download 26,57 Mb.

Do'stlaringiz bilan baham:
1   ...   83   84   85   86   87   88   89   90   ...   283




Ma'lumotlar bazasi mualliflik huquqi bilan himoyalangan ©hozir.org 2024
ma'muriyatiga murojaat qiling

kiriting | ro'yxatdan o'tish
    Bosh sahifa
юртда тантана
Боғда битган
Бугун юртда
Эшитганлар жилманглар
Эшитмадим деманглар
битган бодомлар
Yangiariq tumani
qitish marakazi
Raqamli texnologiyalar
ilishida muhokamadan
tasdiqqa tavsiya
tavsiya etilgan
iqtisodiyot kafedrasi
steiermarkischen landesregierung
asarlaringizni yuboring
o'zingizning asarlaringizni
Iltimos faqat
faqat o'zingizning
steierm rkischen
landesregierung fachabteilung
rkischen landesregierung
hamshira loyihasi
loyihasi mavsum
faolyatining oqibatlari
asosiy adabiyotlar
fakulteti ahborot
ahborot havfsizligi
havfsizligi kafedrasi
fanidan bo’yicha
fakulteti iqtisodiyot
boshqaruv fakulteti
chiqarishda boshqaruv
ishlab chiqarishda
iqtisodiyot fakultet
multiservis tarmoqlari
fanidan asosiy
Uzbek fanidan
mavzulari potok
asosidagi multiservis
'aliyyil a'ziym
billahil 'aliyyil
illaa billahil
quvvata illaa
falah' deganida
Kompyuter savodxonligi
bo’yicha mustaqil
'alal falah'
Hayya 'alal
'alas soloh
Hayya 'alas
mavsum boyicha


yuklab olish