Problem with lgraph generation
5 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
I am trying to implement a trainRCNNObjectDetector task.
I am closely following the example on the following webpage:
I have finally gotten all of my data into the correct input format, where the MATLAB commands are no longer giving me error feedback on the structure of the input data.
Next, in my code, I invoke usage of the following command to create an lgraph for my application, and I later successfully train the network :
lgraph = resnetLayers([740 1400 3], 2);
...
net = trainNetwork(imageDatastoreObj,lgraph,options);
Ok?
Next, I want to invoke the trainRCNNObjectDetector code, and I execute the following (note:not all declared variables are shown here):
load('myTable.mat')
T(:,1) = XTrain(:,1);
valsTable = T;
rcnn = trainRCNNObjectDetector(valsTable, net.Layers, options, 'NegativeOverlapRange', [0 0.3]);
I get the following error:
Error using trainRCNNObjectDetector
Invalid network.
Caused by:
Layer 'stack1_block1_add': Unconnected input. Each layer input must be connected to the output of another layer.
Layer 'stack1_block2_add': Unconnected input. Each layer input must be connected to the output of another layer.
Layer 'stack1_block3_add': Unconnected input. Each layer input must be connected to the output of another layer.
Layer 'stack2_block1_add': Unconnected input. Each layer input must be connected to the output of another layer.
Layer 'stack2_block2_add': Unconnected input. Each layer input must be connected to the output of another layer.
Layer 'stack2_block3_add': Unconnected input. Each layer input must be connected to the output of another layer.
Layer 'stack2_block4_add': Unconnected input. Each layer input must be connected to the output of another layer.
Layer 'stack3_block1_add': Unconnected input. Each layer input must be connected to the output of another layer.
Layer 'stack3_block2_add': Unconnected input. Each layer input must be connected to the output of another layer.
Layer 'stack3_block3_add': Unconnected input. Each layer input must be connected to the output of another layer.
Layer 'stack3_block4_add': Unconnected input. Each layer input must be connected to the output of another layer.
Layer 'stack3_block5_add': Unconnected input. Each layer input must be connected to the output of another layer.
Layer 'stack3_block6_add': Unconnected input. Each layer input must be connected to the output of another layer.
Layer 'stack4_block1_add': Unconnected input. Each layer input must be connected to the output of another layer.
Layer 'stack4_block2_add': Unconnected input. Each layer input must be connected to the output of another layer.
Layer 'stack4_block3_add': Unconnected input. Each layer input must be connected to the output of another layer.
Next, after researching on chatGPT and other sources,
I attempt the following code and get the following error:
>> lgraph = connectLayers(lgraph, 'stack1_block1_bn3', 'stack1_block1_add/in2');
lgraph = connectLayers(lgraph, 'stack1_block1_skip_bn', 'stack1_block1_add/in1');
Error using nnet.cnn.LayerGraph/connectLayers
Unable to connect to 'stack1_block1_add/in2'. This input is already connected.
>> lgraph = connectLayers(lgraph, 'stack1_block1_skip_bn', 'stack1_block1_add/in1');
Error using nnet.cnn.LayerGraph/connectLayers
Unable to connect to 'stack1_block1_add/in1'. This input is already connected.
When I perform analyzeNetwork(net), all of the connections show that they are connected. None of the points in the analyzeNetwork(net)-generated graphic look disconnected.
What am I possibly doing wrong here ? OR, is this a MATLAB issue? If you need to see more code, just ask and I will post my code.
0 comentarios
Respuesta aceptada
Más respuestas (0)
Ver también
Categorías
Más información sobre Sequence and Numeric Feature Data Workflows en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!