In MATLAB, feedforwardnet(8)
creates a feedforward network with one hidden layer containing 8 hidden neurons. MATLAB stores numeric data as double-precision floating point (double) by default. Therefore feedforwardnet(8)
is equivalent to feedforwardnet(double(8))
.
However, feedforwardnet(int32(8))
will raise the following error:
Undefined function or variable 'ind'.
Error in network/subsasgn>setLayerSize (line 1170)
err = sprintf('"layers{%g}.size" must be a positive integer.',ind);
Error in network/subsasgn>network_subsasgn (line 180)
if isempty(err), [net,err] = setLayerSize(net,i,newSize); end
Error in network/subsasgn (line 13)
net = network_subsasgn(net,subscripts,v,netname);
Error in feedforwardnet>create_network (line 116)
net.layers{i}.size = param.hiddenSizes(i);
Error in feedforwardnet (line 69)
net = create_network(param);
Why won't feedforwardnet()
takes an int32
as argument? Equivalently, why doesn't isposint()
(in *network/subsasgn.m, line 1169)) returns true
when given int32(8)
as argument?
The code was tested with MATLAB 2011a, 2012a and 2012b.