Infrastructure code for 2D convolution layer in CNN

5 visualizaciones (últimos 30 días)
alex
alex el 1 de Nov. de 2020
Respondida: Anay el 28 de Ag. de 2025 a las 5:30
Hello. I need to get weights from neurons of one 2d convolution layer in CNN and do some process. I need complete structure code of 2d conv layer. can any one help me to access it? regards

Respuestas (1)

Anay
Anay el 28 de Ag. de 2025 a las 5:30
Hi alex,
I understand that you want to get the weights and biases from a specific convolution layer in your CNN.
You can access the individual layers from your network by using the “Layer” property which is an array of the layers present in the network.
conv_layer = net.Layers(i); % i is the index of 2D convolutional layer
You can get the weights and biases from a layer using the “weights” and “biases” properties respectively.
% Access the weights
weights = conv_layer.Weights;
bias = conv_layer.Bias;
I hope this helps!

Categorías

Más información sobre Install Products en Help Center y File Exchange.

Community Treasure Hunt

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

Start Hunting!

Translated by