Skip to content

Commit 0205646

Browse files
committed
Fixed everything from gemini that I could
1 parent bfd12ce commit 0205646

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

examples/vision/nl_image_search.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -460,7 +460,7 @@ def compute_loss(self, caption_embeddings, image_embeddings):
460460
targets = keras.activations.softmax(
461461
(captions_similarity + images_similarity) / (2 * self.temperature)
462462
)
463-
463+
464464
# Compute the loss for the captions using cross-entropy
465465
captions_loss = keras.losses.categorical_crossentropy(
466466
y_true=targets, y_pred=logits, from_logits=True
@@ -503,7 +503,7 @@ def train_step_torch(self, features):
503503
# Monitor loss
504504
self.loss_tracker.update_state(loss)
505505
return {"loss": self.loss_tracker.result()}
506-
506+
507507
def test_step(self, features):
508508
caption_embeddings, image_embeddings = self(features, training=False)
509509
loss = self.compute_loss(caption_embeddings, image_embeddings)

0 commit comments

Comments
 (0)