Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
OpenDAS
vision
Commits
4b6fc6b8
"torchvision/git@developer.sourcefind.cn:OpenDAS/vision.git" did not exist on "a81d99b7977f2064926a23006e4f64ae458ca09d"
Unverified
Commit
4b6fc6b8
authored
Oct 06, 2021
by
Vasilis Vryniotis
Committed by
GitHub
Oct 06, 2021
Browse files
Fix bug on EMA n_averaged estimation. (#4544)
parent
8cc6d521
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
1 deletion
+1
-1
references/classification/utils.py
references/classification/utils.py
+1
-1
No files found.
references/classification/utils.py
View file @
4b6fc6b8
...
@@ -180,7 +180,7 @@ class ExponentialMovingAverage(torch.optim.swa_utils.AveragedModel):
...
@@ -180,7 +180,7 @@ class ExponentialMovingAverage(torch.optim.swa_utils.AveragedModel):
p_swa
.
detach
().
copy_
(
p_model_
)
p_swa
.
detach
().
copy_
(
p_model_
)
else
:
else
:
p_swa
.
detach
().
copy_
(
self
.
avg_fn
(
p_swa
.
detach
(),
p_model_
,
self
.
n_averaged
.
to
(
device
)))
p_swa
.
detach
().
copy_
(
self
.
avg_fn
(
p_swa
.
detach
(),
p_model_
,
self
.
n_averaged
.
to
(
device
)))
self
.
n_averaged
+=
1
self
.
n_averaged
+=
1
def
accuracy
(
output
,
target
,
topk
=
(
1
,)):
def
accuracy
(
output
,
target
,
topk
=
(
1
,)):
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment