Closed mcreel closed 5 years ago
@mcreel Thanks for the PR! What is the difference between this new layer and the existing SquareLossLayer
?
Hi, This layer reports RMSE for each of the outputs, as well as the average over all outputs. In some cases, certain outputs may be more important than others, so a user might like to know RMSE for each output. So, it gives more output. Also, as far as I understand it, the proposed RegressionAccuracyLayer is analogous to AcurracyLayer, that is, it is a statistics layer, not a loss layer. Can the SquareLossLayer be used for computing accuracy of a test sample, as well as for loss in the training step? Best, Michael
On Fri, Feb 26, 2016 at 3:56 PM, Chiyuan Zhang notifications@github.com wrote:
@mcreel https://github.com/mcreel Thanks for the PR! What is the difference between this new layer and the existing SquareLossLayer?
— Reply to this email directly or view it on GitHub https://github.com/pluskid/Mocha.jl/pull/184#issuecomment-189313034.
@mcreel Yes, it actually could act both as a loss layer and as a statistics layer. It report the "overall" mean squared error. So in the case of multi-output regression, the statistics here will be the same as the objective function value (unlike in the case of classification).
I have tried out using SquareLossLayer as a statistics layer, and yes, it does work, which is good to know. However, when doing validation for a regression net with multiple outputs, the information given by SquareLossLayer is quite sparse. In my work, I would like to the the RMSEs for each output, which is what the proposed layer adds.
Two files are added: a regression accuracy layer, and an example of regression. The regression accuracy layer reports RMSE for all outputs, as well as RMSE averaged over outputs. One file src/layers.jl is modified, to add support for the new regression accuracy layer.