How to use layrecnet in matlab2017b ?

조회 수: 5(최근 30일)
Thierry Gallopin
Thierry Gallopin 2017년 10월 19일
답변: Corey Silva 2017년 10월 24일
Matlab display an error when I simply try to launch the code:
>> net = layrecnet(1:2,10);
Subscripted assignment dimension mismatch.
Error in minmax (line 23)
[extrema(1),extrema(2),inds(1),inds(2)] = CORE_minmax(X(:));
Error in initnw>configure_layer_weight (line 109)
config.range = minmax(x);
Error in initnw (line 50)
out1 = configure_layer_weight(in2,in4,in5,in6);
Error in initlay>configure_layer_weight (line 118)
settings = feval(initFcn,'configure',net,'LW',i,j,x);
Error in initlay (line 47)
out1 = configure_layer_weight(in2,in4,in5,in6);
Error in nnet.internal.configure.layerWeight (line 26)
Error in nnet.internal.configure.layer>iConfigurePreceedingLayerWeights (line 72)
net = nnet.internal.configure.layerWeight(net,i,j,range);
Error in nnet.internal.configure.layer (line 25)
net = iConfigurePreceedingLayerWeights(net,i,range);
Error in network/subsasgn>setLayerInitFcn (line 1134)
net = nnet.internal.configure.layer(net,i,net.layers{i}.dimensions);
Error in network/subsasgn>network_subsasgn (line 188)
if isempty(err), [net,err] = setLayerInitFcn(net,i,initFcn); end
Error in network/subsasgn (line 10)
net = network_subsasgn(net,subscripts,v,netname);
Error in feedforwardnet>create_network (line 119)
net.layers{i}.initFcn = 'initnw';
Error in feedforwardnet (line 69)
net = create_network(param);
Error in layrecnet>create_network (line 106)
net = feedforwardnet(param.hiddenSizes,param.trainFcn);
Error in layrecnet (line 76)
net = create_network(param);
Does anyone has a solution ?

채택된 답변

Corey Silva
Corey Silva 2017년 10월 24일
It looks like your minmax function might be overloaded with a custom function. The error points to CORE_minmax.
I suggest you do the following:
>> which -all minmax
Then, remove any non-standard minmax functions from your MATLAB path.

추가 답변(0개)

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by