Skip to content

Commit

Permalink
hotfix mean, var assign
Browse files Browse the repository at this point in the history
  • Loading branch information
jiangxinglei committed Sep 10, 2024
1 parent 4bc4e37 commit 77fbd94
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions tensornet/layers/normalization_layer.py
Original file line number Diff line number Diff line change
Expand Up @@ -120,9 +120,10 @@ def _increment_and_check_count():
_increment_and_check_count()
else:
self.bn_statistics_push(False)
else:
mean = self.moving_mean
var = self.moving_variance
self.update_moments()

mean = self.moving_mean
var = self.moving_variance

outputs = tf.nn.batch_normalization(x=inputs, mean=mean, variance=var, offset=self.beta, scale=self.gamma, variance_epsilon=self.epsilon)

Expand Down

0 comments on commit 77fbd94

Please sign in to comment.