Beginning Anomaly Detection Using


Sequential vs. ModuleList



Download 26,57 Mb.
Pdf ko'rish
bet258/283
Sana12.07.2021
Hajmi26,57 Mb.
#116397
1   ...   254   255   256   257   258   259   260   261   ...   283
Bog'liq
Beginning Anomaly Detection Using Python-Based Deep Learning

 Sequential vs. ModuleList

Similar to Keras, PyTorch has a couple different ways to define the model.



Sequentially, as in Figure 

B-16


Figure B-16.  A sequential model in PyTorch

This is similar to the sequential model in Keras, where you add layers one at a time 

and in order.

ModuleList, as in Figure 

B-17


appendix B   intro to pytorch


377

Figure B-17.  A model in PyTorch defined in a ModuleList format

This is similar to the functional model that you can build in Keras. This is a more 

customizable way to build your model, and allows you much more flexibility in how you 

want to build it too.



 Layers

We’ve covered how to build the models, so let’s look at examples of some common layers 

you can build.

 Conv1d

torch.nn.Conv1d()

Check out Chapter 

7

 for a detailed explanation on how one-dimensional 



convolutions work.

appendix B   intro to pytorch




378

This layer is a one-dimensional (or temporal) convolutional layer. It basically passes 

a filter over the one-dimensional input and multiplies the values element-wise to create 

the output feature map.

These are the parameters that the function takes:

• 

in_channels: The dimensionality of the input space; the number of 

input nodes.

• 

out_channels: The dimensionality of the output space; the number 

of output nodes.

• 


Download 26,57 Mb.

Do'stlaringiz bilan baham:
1   ...   254   255   256   257   258   259   260   261   ...   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