We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
TypeError Traceback (most recent call last) in () ----> 1 accuracy(*learn.TTA())
~/fastai/courses/dl1/fastai/metrics.py in accuracy(preds, targs) 3 4 def accuracy(preds, targs): ----> 5 preds = torch.max(preds, dim=1)[1] 6 return (preds==targs).float().mean() 7
TypeError: torch.max received an invalid combination of arguments - got (numpy.ndarray, dim=int), but expected one of:
The text was updated successfully, but these errors were encountered:
This maybe the same issue as #115 .
Sorry, something went wrong.
arguments should be cast, e.g., torchLongTensor(targs)
Let's move the discussion to #115 . We'll need more info about where you're calling the function from to fix this properly, BTW.
Merge pull request fastai#116 from manycoding/patch-1
3eb17e7
fix bbox coordinates convention
No branches or pull requests
TypeError Traceback (most recent call last)
in ()
----> 1 accuracy(*learn.TTA())
~/fastai/courses/dl1/fastai/metrics.py in accuracy(preds, targs)
3
4 def accuracy(preds, targs):
----> 5 preds = torch.max(preds, dim=1)[1]
6 return (preds==targs).float().mean()
7
TypeError: torch.max received an invalid combination of arguments - got (numpy.ndarray, dim=int), but expected one of:
didn't match because some of the keywords were incorrect: dim
The text was updated successfully, but these errors were encountered: