How to save neural network in matlab??

5 ビュー (過去 30 日間)
char S
char S 2014 年 7 月 30 日
回答済み: Greg Heath 2014 年 8 月 7 日
Hi,
I am using MATLAB 2013 neural network toolbox. When I test it after training, I am getting different types of results. I have to save the self generated code with the better results. How can I save it?
Pls reply

採用された回答

Greg Heath
Greg Heath 2014 年 8 月 7 日
To "run" a net means to use a saved net. There is no reason why a saved net will yield different results when it is repeatedly run on the same data.
However, if you mean to repeatedly "train" and run, then different results are to be expected because of the following defaults:
1. The data is randomly divided into trn/val/tst data.
2. Initial weights are chosen randomly.
Therefore, if you want to repeat training results, you should reset the random number generator to the same starting state before the first call to init, configure or train. Search on
greg rng(0)
Thank you for formally accepting my answer
Greg
P.S. If you are using obsolete functions like newfit, newpr or newff, you should initialize the RNG previous to the creation of the net.

その他の回答 (1 件)

Greg Heath
Greg Heath 2014 年 7 月 31 日
save(net) % retrieve using load(net)
Hope this helps
Thank you for formally accepting my answer
Greg
  1 件のコメント
char S
char S 2014 年 8 月 7 日
編集済み: char S 2014 年 8 月 7 日
Thanks for the reply.But I am getting different results when I run different times . I have to save the output and should run the code in my presentaion the best output.
How can i do it? pls reply.

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

カテゴリ

Help Center および File ExchangeSequence and Numeric Feature Data Workflows についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by