Skip to content

Commit 9a5c9a3

Browse files
authored
Merge pull request #3 from steelep/main.py
Tensorflow 1.20 support
2 parents 39e2f5f + 2be6f82 commit 9a5c9a3

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

layers.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ def gated_conv(self):
7272
conv_f += self.payload
7373
conv_g += self.payload
7474

75-
self.fan_out = tf.mul(tf.tanh(conv_f + b_f), tf.sigmoid(conv_g + b_g))
75+
self.fan_out = tf.multiply(tf.tanh(conv_f + b_f), tf.sigmoid(conv_g + b_g))
7676

7777
def simple_conv(self):
7878
W = get_weights(self.W_shape, "W", mask=self.mask)

models.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ def __init__(self, X, conf, h=None):
4848
if conf.data == "mnist":
4949
with tf.variable_scope("fc_2"):
5050
self.fc2 = GatedCNN([1, 1, 1], fc1, gated=False, mask='b', activation=False).output()
51-
self.loss = tf.reduce_mean(tf.nn.sigmoid_cross_entropy_with_logits(self.fc2, self.X))
51+
self.loss = tf.reduce_mean(tf.nn.sigmoid_cross_entropy_with_logits(logits=self.fc2, labels=self.X))
5252
self.pred = tf.nn.sigmoid(self.fc2)
5353
else:
5454
color_dim = 256

0 commit comments

Comments
 (0)