how to initialize the neural network to a set of weights ???

Illustration
anna_smith - 2021-05-07T11:27:32+00:00
Question: how to initialize the neural network to a set of weights ???

I created my NN with patternet ??  

Expert Answer

Profile picture of John Williams John Williams answered . 2025-11-20

Unlike the older nets (e.g., newfit, newpr, newff,...), you cannot assign weights to the newer networks (e.g., fitnet, patternnet, feedforwardnet,...) unless the net is configured.
There are two ways to configure the net before manually assigning your own initial weights. Both will assign initial weights that you can overwrite:
1. help/doc configure.
net = configure(net, x, t );
2. Train the net for 1 epoch
net.trainParam.epochs= 1.
net = train(net,x,t);
Hope this helps.


Not satisfied with the answer ?? ASK NOW

Get a Free Consultation or a Sample Assignment Review!