618c1cac7908e5aa61fd95e0d1c6c1f31a2db95d,pymanopt/core/problem.py,Problem,backend,#Problem#,75

Before Change


                                                  self._arg):
                    self._backend = backend_autograd
            if self._backend is None:
                raise ValueError(
                    "Cannot identify an autodiff backend from cost "
                    "function that also was successfully imported. "
                    "TheanoBackend was%s successfully imported. " %
                    ("" if backend_theano.is_available() else " not") +
                    "AutogradBackend was%s successfully imported. " %
                    ("" if backend_autograd.is_available() else " not")
                    )
        return self._backend

    @property
    def cost(self):

After Change


            for backend in self._backends:
                if backend.is_compatible(self._original_cost, self._arg):
                    self._backend = backend
                    break
            else:
                backend_names = [backend.name for backend in self._backends]
                raise ValueError(
                    "Cannot determine autodiff backend from cost function. "
                    "Available backends are: {:s}".format(
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 3

Instances


Project Name: pymanopt/pymanopt
Commit Name: 618c1cac7908e5aa61fd95e0d1c6c1f31a2db95d
Time: 2016-02-19
Author: niklas.koep@gmail.com
File Name: pymanopt/core/problem.py
Class Name: Problem
Method Name: backend


Project Name: lengstrom/fast-style-transfer
Commit Name: 31bfc7c1ce9dac771dbd5e2edf2d5e789d8b1aaa
Time: 2016-12-23
Author: jonathan.e.m.bocker@gmail.com
File Name: evaluate.py
Class Name:
Method Name: from_pipe


Project Name: dit/dit
Commit Name: a1890b56835ef626b1a32edcaf28c1e2b10baa48
Time: 2015-03-19
Author: chebee7i@gmail.com
File Name: dit/algorithms/maxentropyfw.py
Class Name:
Method Name: initial_point