delta#
- class diffsptk.Delta(seed=[[-0.5, 0, 0.5], [1, -2, 1]], static_out=True)[source]#
- See this page for details. - Parameters:
- seedlist[list[float]] or list[int]
- Delta coefficients or width(s) of 1st (and 2nd) regression coefficients. 
- static_outbool [scalar]
- If False, output only delta components. 
 
 - forward(x)[source]#
- Compute delta components. - Parameters:
- xTensor [shape=(B, T, D) or (T, D)]
- Static components. 
 
- Returns:
- yTensor [shape=(B, T, DxH) or (T, DxH)]
- Delta (and 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]]]) 
 
See also