浏览代码

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

keyword argument 'dtype'".
Yuefeng Zhou 8 年之前
父节点
当前提交
33bc8b1469
共有 1 个文件被更改,包括 2 次插入2 次删除
  1. 2 2
      inception/inception/slim/ops.py

+ 2 - 2
inception/inception/slim/ops.py

@@ -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,
                                      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)