Skip to content
This repository has been archived by the owner on Apr 10, 2024. It is now read-only.

Commit

Permalink
Debug on CI
Browse files Browse the repository at this point in the history
  • Loading branch information
gabgoh committed Feb 20, 2019
1 parent 4911f12 commit 97c15a7
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion lucid/optvis/objectives.py
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,13 @@ def _dot_cossim(x, y, cossim_pow=0):
if cossim_pow == 0: return tf.reduce_mean(xy_dot)
x_mags = tf.sqrt(_dot(x,x))
y_mags = tf.sqrt(_dot(y,y))
cossims = xy_dot / (eps + x_mags ) / (eps + y_mags)
a = xy_dot
b = (eps + x_mags )
c = (eps + y_mags)
d = a / b
e = d / c
print(a,b,c,d,e)
cossims = e
floored_cossims = tf.maximum(0.1, cossims)
return tf.reduce_mean(xy_dot * floored_cossims**cossim_pow)

Expand Down

0 comments on commit 97c15a7

Please sign in to comment.