Beginning Anomaly Detection Using



Download 26,57 Mb.
Pdf ko'rish
bet108/283
Sana12.07.2021
Hajmi26,57 Mb.
#116397
1   ...   104   105   106   107   108   109   110   111   ...   283
Bog'liq
Beginning Anomaly Detection Using Python-Based Deep Learning

Figure 4-43.  Code to import packages

Figure 4-44.  Code to load MNIST images

Chapter 4   autoenCoders




155

Split the dataset into training and testing subsets. Also, reshape the data to 28X28 

images. Figure 

4-45


 shows the code to load and reshape images.

Figure 


4-46

 shows the code to display the images.



Figure 4-45.  Code to load and reshape images

Figure 4-46.  Code to display the images

Create a CNN model with Convolutions and MaxPool layers. Figure 

4-47

 shows the 



code to create the neural network.

Chapter 4   autoenCoders




156

Compile the model using RMSprop as the optimizer and mean squared error for the 

loss computation. The RMSprop optimizer is similar to the gradient descent algorithm 

with momentum. Figure 

4-48

 shows the code to compile the model.



Figure 4-47.  Code to create the neural network

Chapter 4   autoenCoders




157

Now, you can start training the model using the training dataset to validate the model 

at every step. Choose 32 as the batchsize and 20 epochs. The training process outputs 

the loss and accuracy as well as the validation loss and validation accuracy at each epoch. 

Figure 

4-49


 shows the code to start training the model.


Download 26,57 Mb.

Do'stlaringiz bilan baham:
1   ...   104   105   106   107   108   109   110   111   ...   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