深度學習入門小白求助,用MATLAB自帶函式編的一個兩層的autoencoder(encode-encode-decode-decode),訓練樣本輸入x的reconstruction error,比用一層的(encode-decode)還要大,這種情況是正常的嗎?還是代碼哪里有問題?
代碼如下:
% Train the first encoder
autoenc1 = trainAutoencoder(x,i,'MaxEpochs',400,'DecoderTransferFunction','purelin');
% Extract the encoded data for new images using the first autoencoder.
features1 = encode(autoenc1,x);
% Train the second encoder
autoenc2 = trainAutoencoder(features1,10,'MaxEpochs',400,'DecoderTransferFunction','purelin');
% Extract the encoded data for new images using the second autoencoder.
features2 = encode(autoenc2,features1);
% Decode the encoded data from the autoencoder.
regenerated2 = decode(autoenc2,features2);
regenerated = decode(autoenc1,regenerated2);
% Calculate the reconstruction error
prefomance=sqrt(mse(x-regenerated));
P.S. 輕噴為什么不用Python...
轉載請註明出處,本文鏈接:https://www.uj5u.com/qita/68352.html
標籤:人工智能技術
上一篇:激發極化或頻域激電法正演模擬軟體
