what is the default kernel_initializer in keras

前端 未结 2 1763
情话喂你
情话喂你 2021-02-03 17:01

In the user manual, it shows the different kernel_initializer below

https://keras.io/initializers/

the main purpose is to initialize the weight matrix in the neura

2条回答
  •  青春惊慌失措
    2021-02-03 17:56

    Usually, it's glorot_uniform by default. Different layer types might have different default kernel_initializer. When in doubt, just look in the source code. For example, for Dense layer:

    class Dense(Layer):
    ...
        def __init__(self, units,
                     activation=None,
                     use_bias=True,
                     kernel_initializer='glorot_uniform',
                     bias_initializer='zeros',
                     kernel_regularizer=None,
                     bias_regularizer=None,
                     activity_regularizer=None,
                     kernel_constraint=None,
                     bias_constraint=None,
                     **kwargs):
    

提交回复
热议问题