MATLAB Answers

Finding two layers to replace in googlenet

32 views (last 30 days)
Dear Altruists,
I was trying this example: for deep learning using googlenet.But its showing me error which is "Undefined function or variable 'findLayersToReplace' " in this two lines
[learnableLayer,classLayer] = findLayersToReplace(lgraph);
I have tried this lines in the command prompt
But i'm not getting any fruitfull result...
Please help me creating the function of findLayersToReplace.
Thanks in advance.


Mohammad Sami
Mohammad Sami on 30 Jan 2020
Do you have deep learning and neural network toolbox ?
What is your matlabs version ?
Tahmina Sumi
Tahmina Sumi on 30 Jan 2020
Yes I have installed necessary toolbox of deep learning and neural network.My matlab version is R2018a....
As per the link "" i tried this line "edit(fullfile(matlabroot,'examples','nnet','main','findLayersToReplace.m'))"
in command prompt and its showing error. I am attaching a picture of the error here.. Screenshot (764).png

Sign in to comment.

Accepted Answer

Mohammad Sami
Mohammad Sami on 31 Jan 2020
For R2018a, you can follow this tutorial. Essentially it shows you what the findLayersToReplace function was doing.
For most transfer learning applications, we remove the final fully connected layer, softmax layer and classification layer.
These are then replaced with your own fc, softmax and classification layers.

  1 Comment

Sign in to comment.

More Answers (0)

Sign in to answer this question.