It is common in regression to see $R^2$ formulated as follows: $$R^2\equiv 1 - {SS_{\rm err}\over SS_{\rm tot}},$$ where $SS_\text{err}=\sum_i (y_i - f_i)^2$ and $SS_\text{tot}=\sum_i (y_i-\bar{y})^2$. This exact formulation seems to make the most sense if the goal of the regression is indeed to minimize the residual sum of squares. However, sometimes other, more exotic loss functions are more appropriate for a variety of reasons, and some predictive modeling algorithms might be tried to minimize this loss function.
I would like to define my $R^2$-like measure in the following way: $$R^2= 1 - \frac{\sum_il(y_i, f_i)}{\sum_il(y_i, \bar{y})},$$
where $l(y_i, f_i)$ denotes the "loss" occurred in some sense if $f_i$ is predicted but the actual answer is $y_i$. In the case of OLS regression, $l(y_i, f_i) = (y_i - f_i)^2$, but this allows for other predictive models based on least absolute deviations or even more exotic functions based upon the problem domain.
Is this valid to do? Is anything gained with this more general formulation of $R^2$? Is it still valid to call it $R^2$? Does this add any useful interpretations, or is it more likely to just be confusing? Should the traditional $R^2$ be reported as well?