matlab神经网络不常见问题

转载自:http://blog.sina.com.cn/s/blog_6264e23a01012b1x.html

进行神经网络som实验时候经常会遇到这个错误提示:

??? Error using ==> subsindex

Function 'subsindex' is not defined for values of class 'network'.

错误使用 subsindex
没有为类 'network' 的值定义函数 'subsindex'。

一直没有找到解决的办法很是苦恼,去ilovematlab论坛也咨询过,版主建议我查看一下是不是没有转制,但是我心里很清楚我已经进行转制了,所以就当做没这个建议继续寻找,终于在一个国外的网站查到了问题的原因:

网站地址:http://www.mathworks.fr/matlabcentral/newsreader/view_thread/259336

原文如下:You're trying to call the TRAIN _function_ on the network; however, since

there exists a train _variable_ in the workspace the line where the error
occurs is considered to be an attempt to index into the train variable
rather than a call to the TRAIN function. However, MATLAB does not know how
to use a neural network to index into a variable, so you receive that error.

Rename or delete the train variable and that call should work as a call to
the function rather than an attempt to index into the variable.

 

根据老外的意思,我的变量列表中存在名字为train的变量,所以导致程序无法识别,我将变量名称由train修改成train111,然后再次调用train函数结果很顺利的通过了训练,而且图片也很漂亮,所以在这里写一下如果再遇到这样的问题就这么修改!

eg:

                                                matlab神经网络不常见问题_第1张图片

因为我之前定义了train的变量,之后又调用了train函数,前后出现了矛盾,出现了错误,只需将之前的train改个名字即可。

你可能感兴趣的:(BP神经网络)