How to use roialignLayer in the network?

3 visualizzazioni (ultimi 30 giorni)
Tian,HCong
Tian,HCong il 15 Giu 2024
Modificato: Ashutosh Thakur il 18 Giu 2024
Hello, I encountered a similar issue as in the link while using roialignLayer.The error displayed on my network is:
Input size mismatch.Size of input to this layer is different from the expected input size.Inputs to this layer:
from layer"activation_40_relu"(size 14(S)× 14(S)× 1024(C)× 1(B))
from layer "regionProposal" (size 1(S)×5(C)×1(B))
Can someone tell me how to modify the network or provide an example of successfully using roialignLayer?
Thank you very much, the network has provided.
  2 Commenti
Ashutosh Thakur
Ashutosh Thakur il 17 Giu 2024
Modificato: Ashutosh Thakur il 18 Giu 2024
Hi Tian,
I have tried to executing your code but I was not facing any error at my end. Can you provide me with the complete steps to get this error? Also the error message indicates that their is mismatch between the size of the "activation_40_relu" layer and "regionProposal" layer. You can try checking by using debugger to check whether size are same or not. Reshape operations can be used to change the size of the array. https://www.mathworks.com/help/matlab/ref/reshape.html
The example mentioned in the following documentation link can be referred on how to use the roialignLayer: https://www.mathworks.com/help/vision/ref/nnet.cnn.layer.roialignlayer.html
Tian,HCong
Tian,HCong il 18 Giu 2024
Thank you very much for your prompt reply.
My mistake came about as follows:
Firstly, run the program, and the result of the program is a network diagram and relevant data of the workspace;
Then, open the app "deepNetwork Designer" in Matlab, convert the network named "lgraph" from the workspace to a format suitable for the app, and import it;
Finally, analyzing the network, as mentioned earlier, there was an issue at the roialignLayer.
Thank you again for your reply.

Accedi per commentare.

Risposte (0)

Prodotti


Release

R2024a

Community Treasure Hunt

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

Start Hunting!

Translated by