Beginning Anomaly Detection Using



Download 26,57 Mb.
Pdf ko'rish
bet270/283
Sana12.07.2021
Hajmi26,57 Mb.
#116397
1   ...   266   267   268   269   270   271   272   273   ...   283
Bog'liq
Beginning Anomaly Detection Using Python-Based Deep Learning

 Cross  Entropy

torch.nn.CrossEntropyLoss()

The equation is shown in Figure 

B-29


.

Figure B-29.  The general formula for cross entropy loss

In this case



n is the number of samples in the whole data set. The parameter h

θ

 

represents the model with the weight parameter 



θ passed in, so h

θ

(x



i

) would give the 

predicted value for x

i

 with model’s weights 



θ. Finally, y

i

 represents the true labels for 

data point at index i. The data needs to be regularized to be between 0 and 1, so for 

categorical cross entropy, it must be piped through a softmax activation layer.  

The categorical cross entropy loss is also called 

softmax loss.

Equivalently, you can write the previous equation as Figure 

B-30

.

appendix B   intro to pytorch




389

In this case, 



m is the number of classes.

The categorical cross entropy loss is a commonly used metric in classification tasks

especially in computer vision with convolutional neural networks.

This function has several parameters (two are deprecated):

• 


Download 26,57 Mb.

Do'stlaringiz bilan baham:
1   ...   266   267   268   269   270   271   272   273   ...   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