nnsvs.mdn.mdn_get_sample

nnsvs.mdn.mdn_get_sample(log_pi, log_sigma, mu)[source]

Sample from mixture of the Gaussian component whose weight coefficient is the largest as the most probable predictions.

Parameters:
  • log_pi (torch.Tensor) – Tensor of shape (B, T, G) or (B, T, G, D_out) The log of multinomial distribution of the Gaussians. B is the batch size, T is data length of this batch, G is num_gaussians of class MDNLayer.

  • log_sigma (torch.Tensor) – Tensor of shape (B, T, G, D_out) The log of standard deviation of the Gaussians. D_out is out_dim of class MDNLayer.

  • mu (torch.Tensor) – Tensor of shape (B, T, G, D_out) The means of the Gaussians. D_out is out_dim of class MDNLayer.

Returns:

Tensor of shape (B, T, D_out)

Sample from the mixture of the Gaussian component.

Return type:

torch.Tensor