Can I initialize feedforward net with 'midpoint'?

Illustration
Alexandra - 2021-08-04T09:39:07+00:00
Question: Can I initialize feedforward net with 'midpoint'?

Hello! I am testing different topologies of the multilayer perceptron in order to get the best one and I would like to avoid randomness in intial conditions in this case: therefore I would like to have all the networks the similar if not the same initial conditions.   However, as I have learnt feedforwardnet has built in Nguyen-Widrow initialization algorithm which delivers each time different result. I also found out that it is possible to set manually the initialization algorithm I want (for example 'midpoint'), however, I am having difficulties to do it for the network, where I change the topology and consequently number of links, weights and biases.   Maybe there is a way to change existing initialization algorithm to another one for the whole network at once?

Expert Answer

Profile picture of Kshitij Singh Kshitij Singh answered . 2025-11-20

1. It doesn't matter how MATLAB initializes your net. You can always override the initialization using

 help setwb
 doc setwb
 type setwb
2. Initializations are not random. They are pseudo-random. That means if you save the state of the rng, the initialization can be duplicated.
 
3. What different topologies are you considering? You do know that a single hidden layer MLP is a universal approximator? The only reason to use two or more hidden layers is to reduce the total number of unknown weights and thresholds. For a given training set size, the design is more stable and better able to generalize to nontraining data the fewer the number of unknown weights.


Not satisfied with the answer ?? ASK NOW

Get a Free Consultation or a Sample Assignment Review!