Skip to content

Commit

Permalink
Fix deprecated options
Browse files Browse the repository at this point in the history
  • Loading branch information
purboo committed Aug 31, 2018
1 parent 0ad1e9c commit 7fbbfae
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 1 addition & 1 deletion one_shot_learning_network.py
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ def __call__(self, support_set, input_image, name, training=False):
eps = 1e-10
similarities = []
for support_image in tf.unstack(support_set, axis=0):
sum_support = tf.reduce_sum(tf.square(support_image), 1, keep_dims=True)
sum_support = tf.reduce_sum(tf.square(support_image), 1, keepdims=True)
support_magnitude = tf.rsqrt(tf.clip_by_value(sum_support, eps, float("inf")))
dot_product = tf.matmul(tf.expand_dims(input_image, 1), tf.expand_dims(support_image, 2))
dot_product = tf.squeeze(dot_product, [1, ])
Expand Down
2 changes: 2 additions & 0 deletions train_one_shot_learning_matching_network.py
100644 → 100755
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
#!/usr/bin/env python3

from one_shot_learning_network import *
from experiment_builder import ExperimentBuilder
import tensorflow.contrib.slim as slim
Expand Down

0 comments on commit 7fbbfae

Please sign in to comment.