Skip to content

Commit 2c5744e

Browse files
committed
[layers] batch norm layer for TF 0.12
1 parent c45feb2 commit 2c5744e

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

tensorlayer/layers.py

100755100644
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1931,7 +1931,7 @@ def __init__(
19311931
axis = list(range(len(x_shape) - 1))
19321932

19331933
## 1. beta, gamma
1934-
if tf.__version__ >= '0.11' and beta_init == tf.zeros_initializer:
1934+
if tf.__version__ >= '0.12' and beta_init == tf.zeros_initializer:
19351935
beta_init = beta_init()
19361936
beta = tf.get_variable('beta', shape=params_shape,
19371937
initializer=beta_init,
@@ -1960,7 +1960,7 @@ def __init__(
19601960
# initializer=tf.ones_initializer,
19611961
# trainable=False)
19621962

1963-
if tf.__version__ >= '0.11':
1963+
if tf.__version__ >= '0.12':
19641964
moving_mean_init = tf.zeros_initializer()
19651965
else:
19661966
moving_mean_init = tf.zeros_initializer

0 commit comments

Comments
 (0)