Shortcuts

Source code for ignite.metrics.root_mean_squared_error

import math
from typing import Union

import torch

from ignite.metrics.mean_squared_error import MeanSquaredError

__all__ = ["RootMeanSquaredError"]


[docs]class RootMeanSquaredError(MeanSquaredError): """ Calculates the root mean squared error. - ``update`` must receive output of the form (y_pred, y) or `{'y_pred': y_pred, 'y': y}`. """ def compute(self) -> Union[torch.Tensor, float]: mse = super(RootMeanSquaredError, self).compute() return math.sqrt(mse)

© Copyright 2022, PyTorch-Ignite Contributors. Last updated on 08/12/2022, 11:25:20 PM.

Built with Sphinx using a theme provided by Read the Docs.