オートエンコーダのウェイトの初期値を調べる方法はありますか?How to check the initial value of EncoderWeights?
1 visualización (últimos 30 días)
Mostrar comentarios más antiguos
祐人 生見
el 23 de Nov. de 2023
Comentada: 祐人 生見
el 2 de Dic. de 2023
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?
0 comentarios
Respuesta aceptada
Lokesh
el 1 de Dic. de 2023
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 about ‘randsmall’:
I hope you find this resolves your query.
Best Regards,
Lokesh
Más respuestas (0)
Ver también
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!