Skip to content
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

Fix broadcasting for batch size > 1 #84

Open
wants to merge 6 commits into
base: master
Choose a base branch
from

Conversation

tomrunia
Copy link

  • fix broadcasting for inference batch size > 1
  • change 4 instances of x.data[0] to x.item()

- change 4 instances of x.data[0] to x.item()
@@ -366,10 +366,10 @@ def inference(args, epoch, data_loader, model, offset=0):
with torch.no_grad():
losses, output = model(data[0], target[0], inference=True)

losses = [torch.mean(loss_value) for loss_value in losses]
losses = [torch.mean(loss_value) for loss_value in losses]
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Duplicate.

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.

None yet

2 participants