RaspberryP​iへの転移学習された​モデルの展開方法につ​いて/How do I deploy a transfer-learned model to a Raspberry Pi?

조회 수: 3 (최근 30일)
Elijah Galbreath
Elijah Galbreath 2021년 9월 22일
편집: Elijah Galbreath 2021년 9월 28일
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개)

카테고리

Help CenterFile Exchange에서 Embedded Coder에 대해 자세히 알아보기

제품


릴리스

R2021a

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!