Skip to content

Fixes to ImageNet training script #19

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Dec 19, 2016
Merged

Conversation

colesbury
Copy link
Member

  • Fix call to top-k which had produced incorrect prec@1 calculation
  • Fix checkpoint loading. Create the DataParallel container before
    resuming checkpoints so that the structure matches.
  • Weight average precision by batch size
  • Add '--evaluate FILE' option to only run on validation set

@@ -247,7 +265,7 @@ def accuracy(output, target, topk=(1,)):
maxk = max(topk)
batch_size = target.size(0)

_, pred = output.topk(maxk, True, True)
_, pred = output.topk(maxk, dim=1, smallest=True, sorted=True)

This comment was marked as off-topic.

This comment was marked as off-topic.

- Fix call to top-k which had produced incorrect prec@1 calculation
- Fix checkpoint loading. Create the DataParallel container before
  resuming checkpoints so that the structure matches.
- Weight average precision by batch size
- Add '--evaluate FILE' option to only run on validation set
@colesbury colesbury merged commit c88ba0a into pytorch:master Dec 19, 2016
g00u pushed a commit to g00u/examples that referenced this pull request Mar 21, 2025
- Fix call to top-k which had produced incorrect prec@1 calculation
- Fix checkpoint loading. Create the DataParallel container before
  resuming checkpoints so that the structure matches.
- Weight average precision by batch size
- Add '--evaluate FILE' option to only run on validation set
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants