Skip to content

Commit

Permalink
make sure batch-normalization layer is assigned to the feature axis
Browse files Browse the repository at this point in the history
  • Loading branch information
Dobiasd committed Mar 2, 2018
1 parent 33307e7 commit 2b80d2f
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions keras_export/convert_model.py
Original file line number Diff line number Diff line change
Expand Up @@ -193,6 +193,8 @@ def show_separable_conv_2d_layer(layer):

def show_batch_normalization_layer(layer):
"""Serialize batch normalization layer to dict"""
assert len(layer.axis) == 1
assert layer.axis[0] == -1 or layer.axis[0] + 1 == len(layer.input_shape)
moving_mean = K.get_value(layer.moving_mean)
moving_variance = K.get_value(layer.moving_variance)
result = {}
Expand Down

0 comments on commit 2b80d2f

Please sign in to comment.