Skip to content

Commit

Permalink
Add files via upload
Browse files Browse the repository at this point in the history
Minor changes to make the model compatible with tensorflow 1.2.
  • Loading branch information
steelep authored Jul 1, 2017
1 parent 39e2f5f commit 2be6f82
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion layers.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion models.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 2be6f82

Please sign in to comment.