Added the LMLS cost function and generalized the cost function

I generalized the cost function: I believe it's better for everyone, who can customize the behaviour of the mlp

I added LMLS: http://ieeexplore.ieee.org/xpl/login.jsp?tp=&arnumber=478411&url=http%3A%2F%2Fieeexplore.ieee.org%2Fxpls%2Fabs_all.jsp%3Farnumber%3D478411
Why are we bothering with more of these finicky options when you can just
use a cost object?


On Sat, Sep 6, 2014 at 9:13 AM, Pascal Lamblin <notifications@github.com>
wrote:

> In pylearn2/models/mlp.py:
>
> > +            loss_function = 'MSE'
> > +        else:
> > +            if use_abs_loss is not None:
> > +
> > +                if loss_function is not None:
> > +                    raise ValueError("use_abs_loss is deprecated. You should use use_abs_loss OR loss_function."
> > +                                 "`use_abs_loss` will be removed on or after December 27, 2014."
> > +                    )
> > +                else:
> > +                    if use_abs_loss:
> > +                        warnings.warn("the `use_abs_loss` parameter is deprecated. Use the `loss_function='MAE'` parameter instead. "
> > +                        "`use_abs_loss` will be removed on or after December 27, 2014.", stacklevel=2)
> > +
> > +                    if not use_abs_loss:
> > +                        warnings.warn("the `use_abs_loss` parameter is deprecated. Use the `loss_function='MSE'` parameter instead. "
> > +                        "`use_abs_loss` will be removed on or after December 27, 2014.", stacklevel=2)
>
> Idem, you should set loss_function to 'MSE' here. Things are supposed to
> continue working as before when the deprecation warning is printed.
>
> —
> Reply to this email directly or view it on GitHub
> <https://github.com/lisa-lab/pylearn2/pull/1111/files#r17209505>.
>