Practical Deep Learning Examples with matlab


predLabelsTest = net.classify(imgDataTest)



Download 5,05 Mb.
Pdf ko'rish
bet6/19
Sana22.07.2022
Hajmi5,05 Mb.
#836233
1   2   3   4   5   6   7   8   9   ...   19
Bog'liq
deep-learning-practical-examples-ebook

predLabelsTest = net.classify(imgDataTest);
accuracy = sum(predLabelsTest == labelsTest) / numel(labelsTest)
accuracy = 0.9880
4. Checking Network Accuracy


10 | Practical Deep Learning Examples with MATLAB
Practical Example #2: Transfer Learning
We’ll use GoogLeNet, a network trained on 1000 categories of objects
including bicycles, cars, and dogs. We want to retrain this network to 
identify five categories of food. Here are the steps:
1. Import the pretrained network.
2. Configure the last three layers to perform a new recognition task.
3. Train the network on new data.
4. Test the results.
In this example, we’ll modify a pretrained network and use transfer 
learning to train it to perform a new recognition task. Fine-tuning a pre-
trained network is much faster and easier than constructing and training 
a new network: You can quickly transfer learning to a new task using a 
smaller number of training images. The advantage of transfer learning 
is that the pretrained network has already learned a rich set of features 
because of the large number of images it was trained on. 
NETWORK_ACCURACY_Training_Images_TRAINED_NETWORK_TRAIN_NETWORK_100s_of_images,_10s_of_classes_...'>PREDICT AND ASSESS
NETWORK ACCURACY
Training Images
TRAINED NETWORK
TRAIN NETWORK
100s of images, 10s of classes
...
Training Options
Training Images
Improve network
REPLACE FINAL LAYERS
Fewer classes, learn faster
...
New layers to learn 
features specific to 
your data set
LOAD PRETRAINED 
NETWORK
1 million images, 1000s of classes
...
Early layers that learned 
low-level features (edges, 
blobs, colors)
Last layers that 
learned task-specific 
features


11 | Practical Deep Learning Examples with MATLAB
1. Importing a Pretrained Network
We can import GoogLeNet in one line of code:
With a pretrained network, most of the heavy lifting of setting up the net-
work (selecting and organizing the layers) has already been done. This 
means we can test the network on images in the categories the network 
was original trained on without any reconfiguring:

Download 5,05 Mb.

Do'stlaringiz bilan baham:
1   2   3   4   5   6   7   8   9   ...   19




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