Skip to content

Commit

Permalink
Update similarity_model.py
Browse files Browse the repository at this point in the history
Update verbose printing to display the count of indexed items.

Verbose output was missing an f-string prefix and also returned the entire shape. Now we just return the number of examples.
  • Loading branch information
owenvallis committed May 5, 2023
1 parent 55632d3 commit 374d9c5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tensorflow_similarity/models/similarity_model.py
Original file line number Diff line number Diff line change
Expand Up @@ -360,7 +360,7 @@ def index(
"""

if verbose:
print("[Indexing {tf.shape(x)} points]")
print(f"[Indexing {tf.shape(x)[0]} points]")
print("|-Computing embeddings")
with tf.device("/cpu:0"):
x = tf.convert_to_tensor(np.array(x))
Expand Down

0 comments on commit 374d9c5

Please sign in to comment.