mlpg#
- diffsptk.MLPG#
alias of
MaximumLikelihoodParameterGeneration
- class diffsptk.MaximumLikelihoodParameterGeneration(size, seed=[[-0.5, 0, 0.5], [1, -2, 1]])[source]#
See this page for details. Currently, only global unit variance is supported.
- Parameters:
- sizeint >= 1 [scalar]
Length of input, \(T\).
- seedlist[list[float]] or list[int]
Delta coefficients or width(s) of 1st (and 2nd) regression coefficients.
- forward(mean)[source]#
Perform MLPG to obtain static sequence.
- Parameters:
- meanTensor [shape=(…, T, DxH)]
Time-variant mean vectors with delta components.
- Returns:
- cTensor [shape=(…, T, D)]
Static components.
Examples
>>> x = diffsptk.ramp(1, 8).view(1, -1, 2) >>> x tensor([[[1., 2.], [3., 4.], [5., 6.], [7., 8.]]]) >>> delta = diffsptk.Delta([[-0.5, 0], [0, 0, 0.5]]) >>> y = delta(x) >>> y tensor([[[ 1.0000, 2.0000, -0.5000, -1.0000, 1.5000, 2.0000], [ 3.0000, 4.0000, -0.5000, -1.0000, 2.5000, 3.0000], [ 5.0000, 6.0000, -1.5000, -2.0000, 3.5000, 4.0000], [ 7.0000, 8.0000, -2.5000, -3.0000, 3.5000, 4.0000]]]) >>> mlpg = diffsptk.MLPG(y.size(1), [[-0.5, 0], [0, 0, 0.5]]) >>> c = mlpg(y) >>> c tensor([[[1., 2.], [3., 4.], [5., 6.], [7., 8.]]])
See also