Can a created Neural network only be updated with train()

Hi,
I have a patternnet neural network created to classify two movements from feature extracted EEG data. The network does not always generalize well to an online test. Say I wanted to take the data from the online test and feed it into the network object to update its chance of generalizing and improving accuracy, is the only way to do that using the train function?
as in, net=train(net,newInput,newTargets);
Thus improving its accuracy for the new data set but at the expense of its accuracy on the original training data.
Thank you

 Accepted Answer

Possibilities (double check my aging memory by creating your own trivial examples)
1. Empty net
a. Use INIT. Results independent of data
b. Use CONFIGURE. Results dependent on data
c. Don't initialize. TRAIN or ADAPT will do
it automatically
2. Non-empty net
a. Use INIT. Existing weights overwritten and
results independent of data.
b. Use CONFIGURE. Existing weights overwritten
and results dependent of data.
c. Don't initialize. TRAIN or ADAPT will
accept existing data as initial data.
Hope this helps.
Thank you for formally accepting my answer
Greg

More Answers (1)

Training with only data2 after training with only data1 will degrade performance on data 1.
Therefore you have several choices. Let
data3 = data1 + data2
Then, the two most logical approaches are
1. Train with data1
2. Train with data3
either
a. initialized with data1 training
b. starting from small random weights
Thank you for formally accepting my answer
Greg

4 Comments

Thank you for the reply Greg.
I already have the network that has been trained on data1, if I then train with data 3 initializing weights for data1 does this reset the previous weights?
I'm looking to get the network to adapt to these slightly different inputs from data2. Is it possible to copy the weights from the data1 trained network and use those to initialize a new network that is then trained on data3?
Thanks,
Isn't that what I just said?
Train with data3. Either
1. initialized with the existing results of the data1 training
or
2. initialized with random weights
Hope this is clear.
However, there are two other possibilities.
Same as 1 and 2 EXCEPT use ADAPT instead of TRAIN. Although I don't recommend this (because it is much, much slower) it can be done.
Greg
Thanks, sorry fairly new to these networks.
Am I right in thinking I can initialize the weights using configure() and then init()? perhaps,
newNet = configure(oldNet, data1, targets1)
newNet = init(oldNet)
NO!
See my answer below
Greg

Sign in to comment.

Categories

Find more on Deep Learning Toolbox in Help Center and File Exchange

Asked:

on 7 Aug 2016

Edited:

on 14 Aug 2016

Community Treasure Hunt

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

Start Hunting!