How to use roialignLayer in the network?

3 ビュー (過去 30 日間)
Tian,HCong
Tian,HCong 2024 年 6 月 15 日
編集済み: Ashutosh Thakur 2024 年 6 月 18 日
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 件のコメント
Ashutosh Thakur
Ashutosh Thakur 2024 年 6 月 17 日
編集済み: Ashutosh Thakur 2024 年 6 月 18 日
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 2024 年 6 月 18 日
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.

サインインしてコメントする。

回答 (0 件)

製品


リリース

R2024a

Community Treasure Hunt

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

Start Hunting!

Translated by