MCPcopy Create free account
hub / github.com/MoonInTheRiver/DiffSinger / inference

Method inference

modules/fastspeech/tts_modules.py:143–151  ·  view source on GitHub ↗

Inference duration. Args: xs (Tensor): Batch of input sequences (B, Tmax, idim). x_masks (ByteTensor, optional): Batch of masks indicating padded part (B, Tmax). Returns: LongTensor: Batch of predicted durations in linear domain (B, Tmax).

(self, xs, x_masks=None)

Source from the content-addressed store, hash-verified

141 return self._forward(xs, x_masks, False)
142
143 def inference(self, xs, x_masks=None):
144 """Inference duration.
145 Args:
146 xs (Tensor): Batch of input sequences (B, Tmax, idim).
147 x_masks (ByteTensor, optional): Batch of masks indicating padded part (B, Tmax).
148 Returns:
149 LongTensor: Batch of predicted durations in linear domain (B, Tmax).
150 """
151 return self._forward(xs, x_masks, True)
152
153
154class LengthRegulator(torch.nn.Module):

Callers 1

add_durMethod · 0.80

Calls 1

_forwardMethod · 0.95

Tested by

no test coverage detected