MATLAB: How to initialize the neural network to a set of weights ??

Deep Learning ToolboxMATLABneural network

I created my NN with patternet ??

Best Answer

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.
Thank you for formally accepting my answer.
Greg