Hi,
In the implementation described above lambd is a global variable that is not passed to grad_reverse. If you passed lambd to this function this would be the reason you gave 1 argument too much.
I did not like to use lambd globally and that is why I added a constructor to the GradReverse class which asks for the lambd value.
class GradReverse(Function):
    def __init__(self, lambd):
        self.lambd = lambd

    def forward(self, x):
        return x.view_as(x)

    def backward(self, grad_output):
        return (grad_output * -self.lambd)

def grad_reverse(x, lambd):
    return GradReverse(lambd)(x)

If you want to change the lambda function dynamically during training, you can add a set_lambda method in the network:
def set_lambda(self, lambd):
    self.lambd = lambd

so you can change the lambda value by calling:
model.set_lambda(lambd)

Now, you can use the grad_reverse function as a normal layer in the network:
def forward(self, x):
    x = grad_reverse(x, self.lambd)

I hope this works for you.
Daniel