Beginning Anomaly Detection Using



Download 26,57 Mb.
Pdf ko'rish
bet182/283
Sana12.07.2021
Hajmi26,57 Mb.
#116397
1   ...   178   179   180   181   182   183   184   185   ...   283
Bog'liq
Beginning Anomaly Detection Using Python-Based Deep Learning

Figure 7-35.  Defines all of the one-dimensional convolutional layers and the 

dropout layers in the model

Chapter 7   temporal Convolutional networks




278

The code chunk in Figure 

7-36

 defines the last two layers, which consist of a layer to 



flatten the data and one layer to represent the two classes.

Now let’s compile the model and look at the summary of the layers (see Figure 

7-37

).

The output should look like Figure 



7-38

.

)ODWWHQOD\HUWRIHHGLQWRWKHRXWSXWOD\HU



IODW )ODWWHQ GURSB

RXWSXWBOD\HU 'HQVH DFWLYDWLRQ VRIWPD[ IODW

7&1 0RGHO LQSXWV LQSXWBOD\HURXWSXWV RXWSXWBOD\HU

Figure 7-36.  Defines the last two layers, which consist of a layer to flatten the data 

and one layer to represent the two classes

7&1FRPSLOH ORVV NHUDVORVVHVFDWHJRULFDOBFURVVHQWURS\

RSWLPL]HU RSWLPL]HUV$GDP OU  

PHWULFV >µPDH¶  DFFXUDF\ @

FKHFNSRLQWHU 0RGHO&KHFNSRLQW ILOHSDWK PRGHOB7&1BFUHGLWFDUGK

YHUERVH 

VDYHBEHVWBRQO\ 7UXH

7&1VXPPDU\



Figure 7-37.  Code to compile the data, define a callback to save the model under 

the given filepath, and output the summary of the model

Chapter 7   temporal Convolutional networks




279

Looking at the model summary can help you understand more about what’s 

going on at each layer. Sometimes, it can help with debugging, where there can be 

dimensionality reductions that you don’t expect. For example, sometimes when odd 

dimensions become reduced by a factor of 2, they might become rounded down. When 

expanding back up, this can prove to be problematic because the new dimension does 

not match the old dimension. You can expect to run into problems like these with 

autoencoders, where the entire aim of the architecture is to compress the data and 

attempt to reconstruct it.

Figure 7-38.  The summary of the model. You can use this to help debug your 

models when you’re creating one from scratch by checking that the output shapes 

for the layers match the input shapes of the subsequent layer

Chapter 7   temporal Convolutional networks




280

Run the code in Figure 

7-39

 to begin the training process.



You should see something like Figure 

7-40


 during the training process.

At the end, you should see something like Figure 

7-41

.

Now that the training is finished, you can evaluate your model’s performance  



(see Figure 

7-42


).

TCN.fit(x_train, y_train,

batch_size=128,

epochs=25,

verbose=1,

validation_data=(x_test, y_test),

callbacks = [checkpointer])


Download 26,57 Mb.

Do'stlaringiz bilan baham:
1   ...   178   179   180   181   182   183   184   185   ...   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