From 9af5ee7446c6be5134164da52beb91b751407659 Mon Sep 17 00:00:00 2001 From: Stergiadis Manos Date: Wed, 11 Nov 2020 18:40:00 +0100 Subject: [PATCH] Fix omniglot double normalization issue (#201) --- examples/vision/maml_omniglot.py | 2 -- 1 file changed, 2 deletions(-) diff --git a/examples/vision/maml_omniglot.py b/examples/vision/maml_omniglot.py index ca2c5624..2e0ae0b7 100644 --- a/examples/vision/maml_omniglot.py +++ b/examples/vision/maml_omniglot.py @@ -36,13 +36,11 @@ def fast_adapt(batch, learner, loss, adaptation_steps, shots, ways, device): # Adapt the model for step in range(adaptation_steps): train_error = loss(learner(adaptation_data), adaptation_labels) - train_error /= len(adaptation_data) learner.adapt(train_error) # Evaluate the adapted model predictions = learner(evaluation_data) valid_error = loss(predictions, evaluation_labels) - valid_error /= len(evaluation_data) valid_accuracy = accuracy(predictions, evaluation_labels) return valid_error, valid_accuracy