Commit 33bc8b14 authored by Yuefeng Zhou's avatar Yuefeng Zhou Committed by Martin Wicke
Browse files

fix the error of "TypeError: ones_initializer() got multiple values for (#777)

keyword argument 'dtype'".
parent bb5798c7
...@@ -91,7 +91,7 @@ def batch_norm(inputs, ...@@ -91,7 +91,7 @@ def batch_norm(inputs,
if scale: if scale:
gamma = variables.variable('gamma', gamma = variables.variable('gamma',
params_shape, params_shape,
initializer=tf.ones_initializer, initializer=tf.ones_initializer(),
trainable=trainable, trainable=trainable,
restore=restore) restore=restore)
# Create moving_mean and moving_variance add them to # Create moving_mean and moving_variance add them to
...@@ -105,7 +105,7 @@ def batch_norm(inputs, ...@@ -105,7 +105,7 @@ def batch_norm(inputs,
collections=moving_collections) collections=moving_collections)
moving_variance = variables.variable('moving_variance', moving_variance = variables.variable('moving_variance',
params_shape, params_shape,
initializer=tf.ones_initializer, initializer=tf.ones_initializer(),
trainable=False, trainable=False,
restore=restore, restore=restore,
collections=moving_collections) collections=moving_collections)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment