Neural net default error: "Default value is not a member of type "nntype.distance_fcn"."
Ältere Kommentare anzeigen
I have not used any neural net programs before, and am trying the built-in neural net example called "Simple Clusters" via the Gui App. When I load the example data, and choose the default 10 neurons, I get this error:
Default value is not a member of type "nntype.distance_fcn".
As far as I know, I have not changed any default settings, the distanceFnc is still the default "linkdist", which exists in my path. Any suggestions would be appreciated. Thanks,
2 Kommentare
Greg Heath
am 20 Feb. 2014
Show relevant code and error messages
Jipei Chen
am 9 Jan. 2020
I also encountered the same problem. Is there any solution currently? Is it a source code issue?
Akzeptierte Antwort
Weitere Antworten (3)
In case someone ends up here after googling the issue like I did, since I am afraid Greg's answer was not particularly useful... What happened in my case (and what may be the issue for you as well) was that I had a function in my path, conflicting with the toolbox - in my case a dist.m I wrote a long time ago and had forgotten about. So you might want to check whether there is a dist.m in your path.
If not, run net = selforgmap; right when launching a "clean" version of matlab with no personal directories added to the path. If it works, add paths in your directories one by one (addpath/rmpath) until you narrow down which one causes the function to fail, and then narrow down to the function... (since I had no idea what I was looking for, once I found the directory I had to remove functions from it until I found which one was the culprit). Hope it helps!
4 Kommentare
Thanks @Monique, I have same problem with SOM tollbox, I tried "net = selforgmap" unfortunately problem exist.I already used it without problem several times.I think the "NNTBX" doesn't work in my computer.
net = selforgmap
Default value is not a member of type "nntype.distance_fcn".
Error using nnetParamInfo (line 28)
Subscripted assignment dimension mismatch.
Error in selforgmap>get_info (line 98)
nnetParamInfo('distanceFcn','Distance Function','nntype.distance_fcn','linkdist',...
Error in selforgmap (line 44)
if isempty(INFO), INFO = get_info; end
end
Rey9
am 6 Apr. 2017
Actually, the problem occurred when I add new toolbox pass (In my case FMRLAB),when I removed it from MATLAB, I could run my program again.
Sinan Islam
am 11 Jan. 2021
Thanks alot Monique. I had a function called dist.m
Honestly, I find it a bit weird that matlab core functions and toolboxes functions do not have their own namespace. Also, I am not sure if matlab have the concept of Environments. Anyhow, I renamed the function and the issue was fixed.
Greg Heath
am 24 Feb. 2014
1 Stimme
If you can't figure it out, try the command line approach and keep my comment in mind.
Hope this helps.
Thank you for formally accepting my answer
Greg
Daniel Perez Rapela
am 24 Okt. 2018
0 Stimmen
I just found the solution here: https://www.mathworks.com/matlabcentral/answers/339194-error-in-feedforwardnet-default-value-is-not-a-member-of-type-nntype-training_fcn#answer_266546
Kategorien
Mehr zu Deep Learning Toolbox finden Sie in Hilfe-Center und File Exchange
Produkte
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!