From 5fef8ce109ab8e72cd475fb1c04c8e7677e4822e Mon Sep 17 00:00:00 2001 From: Tal Weiss Date: Wed, 21 Dec 2016 15:16:28 +0200 Subject: [PATCH] Support latest TensorFlow API Support latest TensorFlow API (and avoid the ValueError exception) --- infogan/misc/custom_ops.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/infogan/misc/custom_ops.py b/infogan/misc/custom_ops.py index 9434a2c..45f6d32 100644 --- a/infogan/misc/custom_ops.py +++ b/infogan/misc/custom_ops.py @@ -13,7 +13,7 @@ def __call__(self, input_layer, epsilon=1e-5, momentum=0.1, name="batch_norm", shape = input_layer.shape shp = in_dim or shape[-1] - with tf.variable_scope(name) as scope: + with tf.variable_scope(tf.get_variable_scope(), reuse=False) as scope: self.gamma = self.variable("gamma", [shp], init=tf.random_normal_initializer(1., 0.02)) self.beta = self.variable("beta", [shp], init=tf.constant_initializer(0.))