rmse#
- diffsptk.RMSE#
alias of
RootMeanSquareError
- class diffsptk.RootMeanSquareError(reduction='mean')[source]#
See this page for details.
- Parameters:
- reduction[‘none’, ‘mean’, ‘sum’]
Reduction type.
- forward(x, y)[source]#
Calculate RMSE.
- Parameters:
- xTensor [shape=(…, D)]
Input.
- yTensor [shape=(…, D)]
Target.
- Returns:
- outTensor [shape=(…,) or scalar]
RMSE.
Examples
>>> x = diffsptk.nrand(4) >>> x tensor([-0.5945, -0.2401, 0.8633, -0.6464, 0.4515]) >>> y = diffsptk.nrand(4) >>> y tensor([-0.4025, 0.9367, 1.1299, 3.1986, -0.2832]) >>> rmse = diffsptk.RootMeanSquaredError() >>> e = rmse(x, y) >>> e tensor(1.8340)
- diffsptk.functional.rmse(x, y, reduction='mean')[source]#
Calculate RMSE.
- Parameters:
- xTensor [shape=(…, D)]
Input.
- yTensor [shape=(…, D)]
Target.
- reduction[‘none’, ‘mean’, ‘sum’]
Reduction type.
- Returns:
- outTensor [shape=(…,) or scalar]
RMSE.
See also