オートエンコーダのウ​ェイトの初期値を調べ​る方法はありますか?​How to check the initial value of EncoderWeights?

1 次查看(过去 30 天)
autoenc=trainAutoencoder(YY23,50, ...
'MaxEpochs',500, ...
'L2WeightRegularization',0.0001, ...
'SparsityRegularization',0.0001, ...
'SparsityProportion',0.1, ...
'ScaleData',false, ...
'UseGPU',false);
このようなプログラムを使用して、オートエンコーダで入力データ(YY23)を学習した時のウェイトを確認しています。比較としてオートエンコーダのエンコーダ部のウェイトの初期値が知りたいのですが、どのように調べるのかご存じなかたはいらっしゃいますか?
I check the EncoderWeights when I use a program like this to learn input data with an autoencoder. As a comparison, I would like to know the initial value of the weights, but dose anyone know how to check it?

采纳的回答

Lokesh
Lokesh 2023-12-1
Hi,
As per my understanding, you want to examine initial value of encoder weights.
The trainAutoencoder function internally includes calls to the following lines of code (accessible via the "edit trainAutoencoder.m" command) which create a network based on the passed parameters and then train the network on input data:
% ... (other code)
paramsStruct = Autoencoder.parseInputArguments(varargin{:});
autonet = Autoencoder.createNetwork(paramsStruct);
autoenc = Autoencoder.train(X, autonet, paramsStruct.UseGPU);
% ... (other code)
The createNetwork function is responsible for setting up the network topology and initializing the weights. Here is a snippet of the code:
function net = createNetwork(paramsStruct)
net = network;
% Define topology
% ... (other code)
% Set up initialization options
net.layers{1}.initFcn = 'initwb';
net.inputWeights{1,1}.initFcn = 'randsmall';
net.biases{1}.initFcn = 'randsmall';
net.layers{2}.initFcn = 'initwb';
net.layerWeights{2,1}.initFcn = 'randsmall';
net.biases{2}.initFcn = 'randsmall';
net.initFcn = 'initlay';
% ... (other code)
Based on the above code, we can observe that the weights are initialized using 'randsmall', which means they are set to small random numbers between -0.1 to 0.1.
Please refer to the following MathWorks documentation link to know more aboutrandsmall’:
I hope you find this resolves your query.
Best Regards,
Lokesh

更多回答(0 个)

产品


版本

R2015b

Community Treasure Hunt

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

Start Hunting!