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)
| 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 | |
| 154 | class LengthRegulator(torch.nn.Module): |