could anyone help me how to validate the neural network

I am developing neural network model to train, validate and test the network.
For training I am using net = trainNetwork(XTrain,YTrain,layers)
For testing I am using YPred = predict(net,XTest).
Before testing I need to do validation with the trained network using validation XVal.
Could anyone please help me how to do validation for the trained network before testing.

3 件のコメント

Image Analyst
Image Analyst 2021 年 6 月 27 日
Normally you have 3 sets of data:
  1. A training set with known ground truth values. This is used in the training process.
  2. A validation set with known ground truth values. This is used in the training process to decide when to quit training.
  3. A test set with unknown values.
It's up to you to collect your 3 sets of data. What happened to your validation set? Did you not use one?
jaah navi
jaah navi 2021 年 6 月 27 日
I have collected training dataset, validation dataset and testing dataset.
Also,I am not using tool box, I am writing the code my myself.
In my code, for the training i am using the command line net = trainNetwork(XTrain,YTrain,layers) to train the model.
Once training is done i need to validate the model using validation dataset(XVal,YVal)
Could you please help me how I need to write the command to do validation using (XVal,YVal) with the already trained model.
Image Analyst
Image Analyst 2021 年 6 月 27 日
You wrote your own trainNetwork() function? Well, you should know how to pass data to it then. Sorry I can't help you anymore with your custom function(s) - I prefer to use Toolbox functions rather than write my own.

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

回答 (1 件)

KSSV
KSSV 2021 年 6 月 27 日

0 投票

Read the documentation of TrainNetwork, you can pass the validation data to the function.

カテゴリ

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

質問済み:

2021 年 6 月 27 日

コメント済み:

2021 年 6 月 27 日

Community Treasure Hunt

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

Start Hunting!

Translated by