Cannot split data for train, validation and test set in neural network

Hello, I want to train a recurrent neural network but I only found one example from the document, and my problem is the training did not split the data set for training, validation and test set even I excuted the code for splitting as the following:
%data conversion
X = con2seq(X);
T = num2cell(T);
%configure RNN
net = layrecnet(1:2,3:5);%3 hidden layer,2 time step
[Xs,Xi,Ai,Ts] = preparets(net,X,T);% prepare input to get time series for training
%training, validation, test split
net.divideParam.trainRatio = 70/100;
net.divideParam.valRatio = 15/100;
net.divideParam.testRatio = 15/100;
net = train(net,Xs,Ts,Xi,Ai);% training the net
view(net);
Y = net(Xs,Xi,Ai);% get prediction
perf = perform(net,Y,Ts);% show the performance
Please tell me where the problem is.
Thanks,
Eason

1 件のコメント

Abel Babu
Abel Babu 2017 年 5 月 31 日
Hi Eason,
The above method code is indeed the right way of splitting data. To get a perspective on the question, what make you think the network is not splitting the data?
Abel

サインインしてコメントする。

回答 (0 件)

カテゴリ

ヘルプ センター および File ExchangeDeep Learning Toolbox についてさらに検索

質問済み:

2017 年 5 月 24 日

コメント済み:

2017 年 5 月 31 日

Community Treasure Hunt

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

Start Hunting!

Translated by