diff --git a/layers.py b/layers.py index d90485a..209f45b 100644 --- a/layers.py +++ b/layers.py @@ -72,7 +72,7 @@ def gated_conv(self): conv_f += self.payload conv_g += self.payload - self.fan_out = tf.mul(tf.tanh(conv_f + b_f), tf.sigmoid(conv_g + b_g)) + self.fan_out = tf.multiply(tf.tanh(conv_f + b_f), tf.sigmoid(conv_g + b_g)) def simple_conv(self): W = get_weights(self.W_shape, "W", mask=self.mask) diff --git a/models.py b/models.py index 8d97eeb..6b0e36a 100644 --- a/models.py +++ b/models.py @@ -48,7 +48,7 @@ def __init__(self, X, conf, h=None): if conf.data == "mnist": with tf.variable_scope("fc_2"): self.fc2 = GatedCNN([1, 1, 1], fc1, gated=False, mask='b', activation=False).output() - self.loss = tf.reduce_mean(tf.nn.sigmoid_cross_entropy_with_logits(self.fc2, self.X)) + self.loss = tf.reduce_mean(tf.nn.sigmoid_cross_entropy_with_logits(logits=self.fc2, labels=self.X)) self.pred = tf.nn.sigmoid(self.fc2) else: color_dim = 256