Skip to content

Commit ae128aa

Browse files
authored
Merge branch 'master' into Laicheng0830-patch-1
2 parents 8049817 + 6a852ff commit ae128aa

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

LICENSE.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
License
22
=======
33

4-
Copyright (c) 2016~2018 The TensorLayer contributors. All rights reserved.
4+
Copyright (c) 2016~2020 The TensorLayer contributors. All rights reserved.
55

66
Apache License
77
Version 2.0, January 2004
@@ -208,4 +208,4 @@ Copyright (c) 2016~2018 The TensorLayer contributors. All rights reserved.
208208

209209
Contact
210210
=======
211-
Questions? Please contact hao.[email protected]
211+
Questions? Please contact hao.[email protected]

tensorlayer/layers/normalization.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -226,7 +226,6 @@ def __init__(
226226
self.moving_var_init = moving_var_init
227227
self.num_features = num_features
228228

229-
self.channel_axis = -1 if data_format == 'channels_last' else 1
230229
self.axes = None
231230

232231
if num_features is not None:
@@ -288,6 +287,7 @@ def build(self, inputs_shape):
288287
def forward(self, inputs):
289288
self._check_input_shape(inputs)
290289

290+
self.channel_axis = len(inputs.shape) - 1 if self.data_format == 'channels_last' else 1
291291
if self.axes is None:
292292
self.axes = [i for i in range(len(inputs.shape)) if i != self.channel_axis]
293293

0 commit comments

Comments
 (0)