Unverified Commit fcbf05bf authored by Avi Thaker's avatar Avi Thaker Committed by GitHub
Browse files

Add a bugfix for conv1d in the cdarts utils. In utils.py, change accuracy's...

Add a bugfix for conv1d in the cdarts utils. In utils.py, change accuracy's view to a reshape. (#3073)
parent 26b71c40
...@@ -58,7 +58,7 @@ def accuracy(output, target, topk=(1,)): ...@@ -58,7 +58,7 @@ def accuracy(output, target, topk=(1,)):
res = [] res = []
for k in topk: for k in topk:
correct_k = correct[:k].view(-1).float().sum(0) correct_k = correct[:k].reshape(-1).float().sum(0)
res.append(correct_k.mul_(1.0 / batch_size)) res.append(correct_k.mul_(1.0 / batch_size))
return res return res
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment