필터 지우기
필터 지우기

Modifing the weights of neural network by setting some weughts to zero

조회 수: 6 (최근 30일)
Salem
Salem 2016년 3월 30일
댓글: cedric MAGUETA RUIVO 2016년 8월 19일
Is there way to access the weights of deep neural networks and set some weights to zero of pretrained model then compute the accuracy of the model. I am working in a project and I need to do the following steps:
  1. train the model or download pretrained model
  2. Set some weights to zeros
  3. Do some computation (this is will be my work)
  4. Test the model again (without trian it again)
I tried those steps on the model pretrind myself using AutoencoderDigitsExample and accessed to the weights for example
autoenc1.EncoderWeights
but I could not modified the weights of the model when I did so
autoenc1.EncoderWeights(1)=0
I recieved this error
You cannot set the read-only property 'EncoderWeights' of Autoencoder.
So please I am looking for a way to accessing the weights of any neural network pretrrained model trained by Matlab.
  댓글 수: 1
cedric MAGUETA RUIVO
cedric MAGUETA RUIVO 2016년 8월 19일
you can transform the autoencoder object into a neural network object with the network fonction and then use the IW and LW properties
net=network(autoenc);
net.IW{1}(1,1)=0; % set the first weigth of the first layer to zero
but with this methode ou can not more use the encode or decode function

댓글을 달려면 로그인하십시오.

답변 (0개)

카테고리

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