(forecast, target, mask)
return 200 * t.mean(divide_no_nan(t.abs(forecast - target),
                                      t.abs(forecast.data) + t.abs(target.data)) * mask)
sMAPE loss as defined in https://robjhyndman.com/hyndsight/smape/ (Makridakis 1993)

    :param forecast: Forecast values. Shape: batch, time
    :param target: Target values. Shape: batch, time
    :param mask: 0/1 mask. Shape: batch, time
    :return: Loss value
sMAPE loss as defined in https://robjhyndman.com/hyndsight/smape/ (Makridakis 1993)
sMAPE loss as defined in https : // robjhyndman . com / hyndsight / smape / ( Makridakis 1993 )
def smape_2_loss(forecast, target, mask) -> t.float:
    """
    sMAPE loss as defined in https://robjhyndman.com/hyndsight/smape/ (Makridakis 1993)

    :param forecast: Forecast values. Shape: batch, time
    :param target: Target values. Shape: batch, time
    :param mask: 0/1 mask. Shape: batch, time
    :return: Loss value
    """
    return 200 * t.mean(divide_no_nan(t.abs(forecast - target),
                                      t.abs(forecast.data) + t.abs(target.data)) * mask)
def smape_2_loss ( forecast , target , mask ) -> t . float : return 200 * t . mean ( divide_no_nan ( t . abs ( forecast - target ) , t . abs ( forecast . data ) + t . abs ( target . data ) ) * mask )