Skip to content

Commit

Permalink
Fix for TensorFlow v0.12 (tf.inv was removed)
Browse files Browse the repository at this point in the history
  • Loading branch information
tkipf committed Nov 30, 2016
1 parent 655d426 commit 9f2d590
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion gcn/layers.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ def sparse_dropout(x, keep_prob, noise_shape):
random_tensor += tf.random_uniform(noise_shape)
dropout_mask = tf.cast(tf.floor(random_tensor), dtype=tf.bool)
pre_out = tf.sparse_retain(x, dropout_mask)
return pre_out * tf.inv(keep_prob)
return pre_out * (1./keep_prob)


def dot(x, y, sparse=False):
Expand Down

0 comments on commit 9f2d590

Please sign in to comment.