Where do I call the BatchNormalization function in Keras?

前端 未结 7 1671
陌清茗
陌清茗 2020-12-02 03:23

If I want to use the BatchNormalization function in Keras, then do I need to call it once only at the beginning?

I read this documentation for it: http://keras.io/la

7条回答
  •  遥遥无期
    2020-12-02 04:17

    It is another type of layer, so you should add it as a layer in an appropriate place of your model

    model.add(keras.layers.normalization.BatchNormalization())
    

    See an example here: https://github.com/fchollet/keras/blob/master/examples/kaggle_otto_nn.py

提交回复
热议问题