fix SpeechT5 doc comments (#22854)

fix doc comments
This commit is contained in:
Matthijs Hollemans 2023-04-19 14:10:40 +02:00 committed by GitHub
parent 84a6570e7b
commit c582e8aad0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -2450,7 +2450,7 @@ class SpeechT5ForSpeechToText(SpeechT5PreTrainedModel):
>>> # compute loss
>>> loss = model(**inputs).loss
>>> round(loss.item(), 2)
19.88
19.68
```
"""
return_dict = return_dict if return_dict is not None else self.config.use_return_dict
@ -2724,7 +2724,7 @@ class SpeechT5ForTextToSpeech(SpeechT5PreTrainedModel):
>>> # generate speech
>>> speech = model.generate_speech(inputs["input_ids"], speaker_embeddings, vocoder=vocoder)
>>> speech.shape
torch.Size([16384])
torch.Size([15872])
```
"""
return_dict = return_dict if return_dict is not None else self.config.use_return_dict