Skip to content

Commit

Permalink
Merge pull request #38 from alankbi/validation-fix
Browse files Browse the repository at this point in the history
Fix validation loss incorrectly using training dataset
  • Loading branch information
alankbi committed May 29, 2020
2 parents c4eaa80 + c055e5d commit cb4293e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion detecto/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -485,7 +485,7 @@ def fit(self, dataset, val_dataset=None, epochs=10, learning_rate=0.005, momentu
if val_dataset is not None:
avg_loss = 0
with torch.no_grad():
for images, targets in dataset:
for images, targets in val_dataset:
self._convert_to_int_labels(targets)
images, targets = self._to_device(images, targets)
loss_dict = self._model(images, targets)
Expand Down

0 comments on commit cb4293e

Please sign in to comment.