Error in createLgraphUsingConnections
Show older comments
I am trying to implement Deep Learning model with my dataset and doing tranfer learning. When I run the given code below:
NumberOfClasses = 2;
nn = inceptionv3;
imageSize = nn.Layers(1, 1).InputSize;
lgraph = layerGraph(nn);
lgraph = replaceLayer(lgraph, 'predictions', fullyConnectedLayer(NumberOfClasses, 'Name', 'FC2'));
lgraph = replaceLayer(lgraph, 'ClassificationLayer_predictions', classificationLayer('Name', 'Output'));
layers = lgraph.Layers;
connections = lgraph.Connections;
obj.NN = createLgraphUsingConnections(layers, connections);
I get error: 'createLgraphUsingConnections' is used in Train Deep Learning Network to Classify New Images.
How I can fix this issue?
Note: I am using MATLAB R2022a version.
Accepted Answer
More Answers (1)
Yomna Genina
on 22 May 2023
0 votes
This is the example that the error message is referring to: https://www.mathworks.com/help/deeplearning/ug/train-deep-learning-network-to-classify-new-images.html
createLgraphUsingConnections is a helper function used by the example. You can access this function by opening the example files in MATLAB:
openExample('nnet/TransferLearningUsingGoogLeNetExample')
Make sure the function is on the MATLAB path before calling it.
Categories
Find more on Image Data Workflows in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!