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

Add a bugfix for conv1d in the cdarts utils. In utils.py, change accu… #3073

Merged
merged 1 commit into from
Nov 13, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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