Skip to content

Commit 9af5ee7

Browse files
authored
Fix omniglot double normalization issue (#201)
1 parent c402014 commit 9af5ee7

1 file changed

Lines changed: 0 additions & 2 deletions

File tree

examples/vision/maml_omniglot.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,13 +36,11 @@ def fast_adapt(batch, learner, loss, adaptation_steps, shots, ways, device):
3636
# Adapt the model
3737
for step in range(adaptation_steps):
3838
train_error = loss(learner(adaptation_data), adaptation_labels)
39-
train_error /= len(adaptation_data)
4039
learner.adapt(train_error)
4140

4241
# Evaluate the adapted model
4342
predictions = learner(evaluation_data)
4443
valid_error = loss(predictions, evaluation_labels)
45-
valid_error /= len(evaluation_data)
4644
valid_accuracy = accuracy(predictions, evaluation_labels)
4745
return valid_error, valid_accuracy
4846

0 commit comments

Comments
 (0)