Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Yaoyao Liu
Reinforced Memory Management for Class-Incremental Learning
Commits
c44f69d1
Verified
Commit
c44f69d1
authored
Dec 13, 2021
by
Yaoyao Liu
Browse files
Update the code
parent
c5e30041
Changes
1
Hide whitespace changes
Inline
Side-by-side
inclearn/train.py
View file @
c44f69d1
...
...
@@ -248,13 +248,6 @@ def _set_seed(seed, nb_threads, no_benchmark, detect_anomaly):
logger
.
info
(
"Set seed {}"
.
format
(
seed
))
random
.
seed
(
seed
)
np
.
random
.
seed
(
seed
)
torch
.
manual_seed
(
seed
)
torch
.
cuda
.
manual_seed_all
(
seed
)
if
no_benchmark
:
logger
.
warning
(
"CUDA algos are not determinists but faster!"
)
else
:
logger
.
warning
(
"CUDA algos are determinists but very slow!"
)
torch
.
backends
.
cudnn
.
deterministic
=
not
no_benchmark
# This will slow down training.
torch
.
set_num_threads
(
nb_threads
)
if
detect_anomaly
:
logger
.
info
(
"Will detect autograd anomaly."
)
...
...
Write
Preview
Supports
Markdown
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