RaspberryPiへの転移学習されたモデルの展開方法について/How do I deploy a transfer-learned model to a Raspberry Pi?
3 visualizzazioni (ultimi 30 giorni)
Mostra commenti meno recenti
resnet50の畳み込みネットワークを自身のデータで転移学習させ、そのmatファイルをresNet.matとして保存した。
転移学習の際には、下のコードでresnet50の最後の3つの層に手を加えてトレーニングさせた。
I used the pre-trained model, Resnet50, and trained my own images on it to create a network to differentiate between two categories.
When I did the transfer learning, I changed the last 3 layers of the Resnet50 model with the code listed below.
lgraph = removeLayers(lgraph, {'ClassificationLayer_fc1000','fc1000_softmax','fc1000'});
numClass = 2;
newLayers =[
fullyConnectedLayer(numClass,'Name','fc','WeightLearnRateFactor',10,'BiasLearnRateFactor',10)
softmaxLayer('Name','softmax')
classificationLayer('Name','classoutput')];
I downloaded the MATLAB support package for the Raspberry pi and put the deep learning linux image on it.
I also confirmed that I could connect to the Raspberry Pi from my computer.
However, when I try to deploy the MAT file that I created with the code below, I come up with an error message.
The error message reads 'Invalid MAT file. MAT file should contain a single instance of either a SeriesNetwork, DAGNetwork, yolov2ObjectDetector or ssdObjectDetector object.'
Maybe I'm not understanding this error code properly, but I thought if I used transfer learning on one of these 4 networks, that the MAT file would be valid. That is why I used Resnet50 which is a DAGNetwork.
deployの関数でRasPiに展開しようとすると、
mynet = coder.loadDeepLearningNetwork('resNet.mat');
のコードでエラーとなった。そのエラーメッセージを下の画像に示す。
matファイルが無効だとエラーになったが、DAGNetworkを転移学習させているため、resNet.matもDAGNetwork
になり、エラーの条件を満たしていると考えていますが、
matファイルが無効な理由、RasPiに展開できない理由はなぜなのでしょうか?
I would appreciate any help.
0 Commenti
Risposte (0)
Vedere anche
Categorie
Scopri di più su Embedded Coder in Help Center e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!