Effacer les filtres
Effacer les filtres

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

4 vues (au cours des 30 derniers jours)
Fahmi Akmal Dzulkifli
Fahmi Akmal Dzulkifli le 18 Jan 2023
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);

Réponses (0)

Catégories

En savoir plus sur Image Data Workflows dans Help Center et File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by