Error in trainAutoencoder function
이전 댓글 표시
Hello,
when trying to train an autoencoder, no matter the input data, I get the following error:
Unable to resolve the name
Autoencoder.parseInputArguments.
Error in trainAutoencoder (line 107)
paramsStruct =
Autoencoder.parseInputArguments(varargin{:});
I've tried running the example found in here, which should work just fine, but I get the aforementioned error, plus a line indicating
Error in filename (line 21)
autoenc1 = trainAutoencoder(xTrainImages,hiddenSize1,'MaxEpochs',400,'L2WeightRegularization',0.004,'SparsityRegularization',4,'SparsityProportion',0.15,'ScaleData',
false);
From what I understand, the error is inside the trainAutoencoder function, in the paramsStruct = Autoencoder.parseInputArguments(varargin{:}) line
if nargin > 1
[varargin{:}] = convertStringsToChars(varargin{:});
end
paramsStruct = Autoencoder.parseInputArguments(varargin{:});
autonet = Autoencoder.createNetwork(paramsStruct);
autoenc = Autoencoder.train(X, autonet, paramsStruct.UseGPU);
end
I've tried looking up the error online, but to no avail. If it's something obvious I just can't see what it is. I have the needed toolboxes installed, and I get this error in the 2019 and 2020 versions of MatLab.
If anyone could help me out, I would be extremely grateful
댓글 수: 4
Devineni Aslesha
2020년 3월 27일
Hi
I could not replicate the issue when I tried running the 'Train Stacked Autoencoders for Image Classification' example mentioned in the question. Could you share the code used from the example that would help me to replicate the issue you are facing?
Álvaro Pequeño Alonso
2020년 3월 27일
Devineni Aslesha
2020년 3월 30일
I would suggest you to make sure to have the digitTrainCellArrayData.m file in the given path 'C:\Program Files\MATLAB\R2019a\toolbox\nnet\nndemos\nndatasets\digitTrainCellArrayData.m'. Also, try doing clear all before the code execution.
For more information, refer the following link.
Álvaro Pequeño Alonso
2020년 4월 1일
채택된 답변
추가 답변 (1개)
Mohammad Eftekhari
2021년 4월 7일
1 개 추천
Sometimes this error is because of the name of the .m file in the running folder. it occurs when one of the .m files in the folder are the same as in the path direction.
카테고리
도움말 센터 및 File Exchange에서 Autoencoders에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!