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.))