Using saved neural network on different size input
Show older comments
Hello,
I am new to MATLAB Neural Networks and have successfully trained and saved a network using input with 100 entries and associated targets. I would like to use this trained network with a smaller number of inputs, say 15 inputs - when I try I get the following error: " Input data sizes do not match net.inputs{1}.size"
I am pretty sure this is because the network was trained on different number of elements - is there a way to use my previously trained network on the new input size, or will I have to retrain for the new size?
Thank you in advance for any help/hints.
Accepted Answer
More Answers (1)
Ameer Hamza
on 14 May 2018
Edited: Ameer Hamza
on 14 May 2018
1 vote
A particular network architecture corresponds to a particular input and output mapping. The input to neural network represents the features which you are using for classification. Decreasing the number of input does not make much sense. Are trying to ignore some features? In that case, convert 15 element vector to 100 element vector by adding 85 zeros. The feature vector must remain of the same size, as used at the time of training.
1 Comment
Richard Haney
on 14 May 2018
Categories
Find more on Deep Learning Toolbox in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!