Skip to content

Commit

Permalink
Update train.py
Browse files Browse the repository at this point in the history
修改了evaluate acc
  • Loading branch information
YanziWang-dot authored Dec 18, 2023
1 parent cd9b8ae commit e48370d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion train.py
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ def evaluate_accuracy(data_iter, net, device=None, only_onebatch=False):
if only_onebatch:
break
net.train()
return acc_sum / n
return acc_sum / len(acc)

if __name__ == '__main__':
setup_seed(42)
Expand Down

0 comments on commit e48370d

Please sign in to comment.