train using mapstd problem.

2 views (last 30 days)
Parkz Leingodz
Parkz Leingodz on 27 Dec 2013
Edited: Parkz Leingodz on 27 Dec 2013
i'm going to train an 15 image to [1 1 1 1 1 1 1 1 1 1 0 0 0 0 0]
my output is one layer but somehow the function mapstd isn't working, do you have any advice for my problem?
clc;
global latih_stdp;
global nettrain;
for i =1:15
img = imread(strcat('E:Skripsi\crop2\image',int2str(i),'.bmp'));
im = rgb2gray(img);
im=reshape(im,[],1);
latih(:,i) = im;
end
T=[1 1 1 1 1 1 1 1 1 1 0 0 0 0 0];
[latih_n,latih_stdp] = mapstd(latih);
net = newff(minmax(latih_n), [3 1], {'logsig' 'purelin'});
net.trainParam.epochs = 1000;
net.trainParam.goal = 1e-20;
net.trainParam.lr = 0.1;
net.trainParam.mc = 0.9;
nettrain = train(net,latih_n,T);
here is the error :
Error using var (line 59)
First argument must be single or double.
Error in std (line 32)
y = sqrt(var(varargin{:}));
Error in mapstd.create (line 15)
settings.xstd(i) = std(xi);
Error in mapstd (line 48)
[y,settings] = mapstd.create(x,param);
Error in b (line 17)
[latih_n,latih_stdp] = mapstd(latih); // why this code can't work?
thanks for kindly answer

Answers (0)

Products

Community Treasure Hunt

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

Start Hunting!