visualize network maskrcnn object and display weights

2 ビュー (過去 30 日間)
Odo Luo
Odo Luo 2022 年 4 月 30 日
編集済み: Manish 2024 年 10 月 18 日
Hello,
I have an maskrcnn object - is there a way to visualize the NN behind it and give out the trained weights?
Cannot find a hint about it at the documentation:
Best Regards

回答 (1 件)

Manish
Manish 2024 年 10 月 18 日
編集済み: Manish 2024 年 10 月 18 日
Hi Odo,
I understand that you would like to visualize the neural network architecture of 'maskrcnn' and display its trained weights.
To visualize the neural network architecture of 'maskrcnn' , you can utilize a function called ‘analyzeNetwork’.
This function helps in visualizing the network's architecture. To find the trained weights of the network, you can iterate through each layer.
Here is the sample code for your reference:
maskobj= maskrcnn("resnet50-coco");
layers = maskobj.Layers;
analyzeNetwork(layers);
for i = 1:numel(layers)
layer = layers(i);
if isprop(layer, 'Weights')
disp(['Layer ', num2str(i), ' Weights:']);
disp(layer.Weights);
end
if isprop(layer, 'Bias')
disp(['Layer ', num2str(i), ' Bias:']);
disp(layer.Bias);
end
end
Here is the documentation link for the function ‘analyzeNetwork’:
hope this helps!

カテゴリ

Help Center および File ExchangeComputer Vision Toolbox についてさらに検索

製品


リリース

R2022a

Community Treasure Hunt

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

Start Hunting!

Translated by