Sorry about the wrong syntax.  I changed the indentation and sent a new pull request.  I didn'tget any format errors from Pylint.  I'm new to git and python so thank you very muchyour help and suggestions.

Date: Tue, 25 Jun 2013 13:00:18 -0700
From: notifications@github.com
To: pylearn2@noreply.github.com
CC: oab102@hotmail.com
Subject: Re: [pylearn2] MLP absolute loss (#381)

In pylearn2/models/mlp.py:

> @@ -1716,8 +1717,10 @@ def cost_from_cost_matrix(self, cost_matrix):
>          return cost_matrix.sum(axis=1).mean()
>  
>      def cost_matrix(self, Y, Y_hat):
> -        return T.sqr(Y - Y_hat)
> -
> +        if(self.use_abs_loss):
> +          return T.abs_(Y - Y_hat)
> +        else:
> +	  return T.sqr(Y - Y_hat)

The standard indention we use is 4 space. The indention are not aligned and this code syntactically is wrong. And easy way to detect these bugs is to first run pylint http://www.logilab.org/857 and run nosetest for the tests in the folder you made the modifications. 


—
Reply to this email directly or view it on GitHub.