'Is there any documentation about default weight initializer in Keras? [duplicate]

I just read about the Keras weight initializers in here. In the documentation, only different initializers has been introduced. Such as:

model.add(Dense(64, kernel_initializer='random_normal'))

I want to know what is the default weight when I don't specify the kernel_initializer argument. Is there a way to access it?



Solution 1:[1]

Each layer has its own default value for initializing the weights. For most of the layers, such as Dense, convolution and RNN layers, the default kernel initializer is 'glorot_uniform' and the default bias intializer is 'zeros' (you can find this by going to the related section for each layer in the documentation; for example here is the Dense layer doc). You can find the definition of glorot_uniform initializer here in the Keras documentation.

As for accessing the weights of each layer, it has already been answered here.

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1