Updated weights of CNN

조회 수: 3 (최근 30일)
Md. Rokibul Islam
Md. Rokibul Islam 2018년 1월 14일
답변: Ronit 2024년 9월 20일
Dear friends, I can initialize weight and view updated weight of Convolutional NN. i need weights of individual iteration/ epoch. is there anyone to help me in this purpose.
Thank you in advance. Rokibul

답변 (1개)

Ronit
Ronit 2024년 9월 20일
Hello Rokibul,
There are a few ways which can be used to save the weights of a Convolutional Neural Network (CNN) at each iteration or epoch.
  1. “getwb” function – This MATLAB function can be utilised if working with Neural Network Toolbox. It retrieves the weights and biases of a network as a single vector. Please use the documentation link for further details: https://www.mathworks.com/help/deeplearning/ref/getwb.html
  2. For Convolutional Neural Networks (CNNs) created using the Deep Learning Toolbox, the weights can be accessed through the “Layers” property of the network. Firstly, access a specific layer using indexing, and then directly access the “Weights”. If you want to extract “weights” from all layers, a “for loop” can be used.
% Assume 'net' is your trained network
% Access the first convolutional layer
convLayer = net.Layers(2); % Adjust the index to match your network
% Extract weights
weights = convLayer.Weights;
I hope it helps your query!

카테고리

Help CenterFile Exchange에서 Deep Learning Toolbox에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by