フィルターのクリア

How to declare the weight and bias values for a convolution layer?

4 ビュー (過去 30 日間)
Fahmi Akmal Dzulkifli
Fahmi Akmal Dzulkifli 2023 年 1 月 18 日
Greetings,
I want to add a convolution layer in the existing squeezenet network. However the errors shown like this:
Error using assembleNetwork (line 47)
Invalid network.
Error in trainyolov3 (line 80)
newbaseNetwork = assembleNetwork(lgraph); % for tiny-yolov3-coco
Caused by:
Layer 'add_conv': Empty Weights property. Specify a nonempty value for the Weights property.
Layer 'add_conv': Empty Bias property. Specify a nonempty value for the Bias property.
Therefore, I want to ask on how to declare the weights and bias value for that layer? My code is as shown below:
lgraph = disconnectLayers(lgraph,'fire8-concat','fire9-squeeze1x1');
layer = [
maxPooling2dLayer([3 3],"Name","pool6","Padding","same","Stride",[2 2])
convolution2dLayer([1 1],512,"Name","add_conv","Padding",[1 1 1 1],"Stride",[2 2])
reluLayer("Name","relu_add_conv")];
lgraph = addLayers(lgraph, layer);
lgraph = connectLayers(lgraph,'fire8-concat','pool6');
lgraph = connectLayers(lgraph,'relu_add_conv','fire9-squeeze1x1');
newbaseNetwork = assembleNetwork(lgraph);

回答 (0 件)

カテゴリ

Help Center および File ExchangeImage Data Workflows についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by