提交 b9f89fa9 编写于 作者: X Xinghai Sun

Add function doc for infer_batch_loss() function in model.py for DS2.

上级 9955f050
...@@ -120,6 +120,16 @@ class DeepSpeech2Model(object): ...@@ -120,6 +120,16 @@ class DeepSpeech2Model(object):
feeding=feeding_dict) feeding=feeding_dict)
def infer_loss_batch(self, infer_data): def infer_loss_batch(self, infer_data):
"""Model inference. Infer the ctc loss for a batch of speech
utterances.
:param infer_data: List of utterances to infer, with each utterance a
tuple of audio features and transcription text (empty
string).
:type infer_data: list
:return: List of ctc loss.
:rtype: List of float
"""
# define inferer # define inferer
if self._loss_inferer == None: if self._loss_inferer == None:
self._loss_inferer = paddle.inference.Inference( self._loss_inferer = paddle.inference.Inference(
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册