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
chenpangpang
transformers
Commits
c582e8aa
Unverified
Commit
c582e8aa
authored
Apr 19, 2023
by
Matthijs Hollemans
Committed by
GitHub
Apr 19, 2023
Browse files
fix SpeechT5 doc comments (#22854)
fix doc comments
parent
84a6570e
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
2 deletions
+2
-2
src/transformers/models/speecht5/modeling_speecht5.py
src/transformers/models/speecht5/modeling_speecht5.py
+2
-2
No files found.
src/transformers/models/speecht5/modeling_speecht5.py
View file @
c582e8aa
...
@@ -2450,7 +2450,7 @@ class SpeechT5ForSpeechToText(SpeechT5PreTrainedModel):
...
@@ -2450,7 +2450,7 @@ class SpeechT5ForSpeechToText(SpeechT5PreTrainedModel):
>>> # compute loss
>>> # compute loss
>>> loss = model(**inputs).loss
>>> loss = model(**inputs).loss
>>> round(loss.item(), 2)
>>> round(loss.item(), 2)
19.
8
8
19.
6
8
```
```
"""
"""
return_dict
=
return_dict
if
return_dict
is
not
None
else
self
.
config
.
use_return_dict
return_dict
=
return_dict
if
return_dict
is
not
None
else
self
.
config
.
use_return_dict
...
@@ -2724,7 +2724,7 @@ class SpeechT5ForTextToSpeech(SpeechT5PreTrainedModel):
...
@@ -2724,7 +2724,7 @@ class SpeechT5ForTextToSpeech(SpeechT5PreTrainedModel):
>>> # generate speech
>>> # generate speech
>>> speech = model.generate_speech(inputs["input_ids"], speaker_embeddings, vocoder=vocoder)
>>> speech = model.generate_speech(inputs["input_ids"], speaker_embeddings, vocoder=vocoder)
>>> speech.shape
>>> speech.shape
torch.Size([1
6384
])
torch.Size([1
5872
])
```
```
"""
"""
return_dict
=
return_dict
if
return_dict
is
not
None
else
self
.
config
.
use_return_dict
return_dict
=
return_dict
if
return_dict
is
not
None
else
self
.
config
.
use_return_dict
...
...
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