def add_loss(self, loss=None, **kwargs):
        if isinstance(loss, losses.Loss):
            self.losses.append(loss)
            return

        form = loss or 'mse'
        if 'form' in kwargs:
            form = kwargs.pop('form').lower()

        kw = dict(target=self.INPUT_NDIM, output_name=self.layers[-1].output_name)
        kw.update(kwargs)

        if isinstance(loss, dict):
            loss = dict(loss)
            if 'form' in loss:
                form = loss.pop('form').lower()
            kw.update(loss)

        self.losses.append(losses.Loss.build(form, **kw))
Given a request, returns the URL where a user should be redirected to
dataset/ETHPy150Open lmjohns3/theanets/theanets/graph.py/Network.add_loss--crossover with--dataset/ETHPy150Open aldryn/django-simple-sso/simple_sso/sso_client/client.py/LoginView.get_next