I have written my own Multi-Layer Perceptron in TensorFlow, in which I initialize the weights and biases like this:
# Store layers weight & bias
weights = {
'h1': tf.Variable(tf.random_normal([n_input, hidden_layer_sizes[0]], 0, 0.1, seed=random_state)), # 1 hidden layer is mandatory
}
biases = {
'b1': tf.Variable(tf.random_normal([hidden_layer_sizes[0]], 0, 0.1, seed=random_state)),
}
for i in range(len(hidden_layer_sizes)-1):
weights['h'+str(i+2)] = tf.Variable(tf.random_normal([hidden_layer_sizes[i], hidden_layer_sizes[i+1]], 0, 0.1, seed=random_state))
biases['b'+str(i+2)] = tf.Variable(tf.random_normal([hidden_layer_sizes[i+1]], 0, 0.1, seed=random_state))
weights['out'] = tf.Variable(tf.random_normal([hidden_layer_sizes[-1], n_classes], 0, 0.1, seed=random_state))
biases['out'] = tf.Variable(tf.random_normal([n_classes], 0, 0.1, seed=random_state))
The number of hidden layers varies between 1 and 4, depending on the input. I have been reading on the Internet about alternative ways of initializing the weights, and I wonder if they are applicable in the MLP model or only in more complex models like CNNs. For example, the Xavier, the HE, the variance-scaled initialization etc.
Does any of the alternative initializers are applicable in my case and which one is considered the best for this type of network?