Skip to content
This repository has been archived by the owner on Sep 18, 2024. It is now read-only.

Commit

Permalink
Add a bugfix for conv1d in the cdarts utils. In utils.py, change accu…
Browse files Browse the repository at this point in the history
…racy's view to a reshape. (#3073)
  • Loading branch information
athaker authored Nov 13, 2020
1 parent 26b71c4 commit fcbf05b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion nni/algorithms/nas/pytorch/cdarts/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ def accuracy(output, target, topk=(1,)):

res = []
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))
return res

Expand Down

0 comments on commit fcbf05b

Please sign in to comment.