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
Torchaudio
Commits
cb77a86c
Commit
cb77a86c
authored
Oct 08, 2021
by
moto
Browse files
Default pretrained weights to eval mode (#1843)
parent
486022e9
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
0 deletions
+1
-0
torchaudio/models/wav2vec2/pretrained.py
torchaudio/models/wav2vec2/pretrained.py
+1
-0
No files found.
torchaudio/models/wav2vec2/pretrained.py
View file @
cb77a86c
...
@@ -72,6 +72,7 @@ class Wav2Vec2PretrainedModelBundle:
...
@@ -72,6 +72,7 @@ class Wav2Vec2PretrainedModelBundle:
dl_kwargs
=
{}
if
dl_kwargs
is
None
else
dl_kwargs
dl_kwargs
=
{}
if
dl_kwargs
is
None
else
dl_kwargs
state_dict
=
load_state_dict_from_url
(
url
,
**
dl_kwargs
)
state_dict
=
load_state_dict_from_url
(
url
,
**
dl_kwargs
)
model
.
load_state_dict
(
state_dict
)
model
.
load_state_dict
(
state_dict
)
model
.
eval
()
return
model
return
model
def
get_labels
(
def
get_labels
(
...
...
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