a6b6b42c249d7a025e9270529bf1db6f21bda36a,GPflow/model.py,Model,_compile,#Model#Any#,123

Before Change


        
        compile the tensorflow function "self._objective"
        
        self._free_vars = tf.Variable(self.get_free_state())

        self.make_tf_array(self._free_vars)
        with self.tf_mode():
            f = self.build_likelihood() + self.build_prior()
            g, = tf.gradients(f, self._free_vars)

After Change


        self._graph = tf.Graph()
        self._session = tf.Session(graph=self._graph)
        with self._graph.as_default():
            self._free_vars = tf.Variable(self.get_free_state())

            self.make_tf_array(self._free_vars)
            with self.tf_mode():
                f = self.build_likelihood() + self.build_prior()
                g, = tf.gradients(f, self._free_vars)
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 4

Instances


Project Name: GPflow/GPflow
Commit Name: a6b6b42c249d7a025e9270529bf1db6f21bda36a
Time: 2016-10-26
Author: james.hensman@gmail.com
File Name: GPflow/model.py
Class Name: Model
Method Name: _compile


Project Name: GPflow/GPflow
Commit Name: 0ede18f7755da45e8aafc0844e455a53645d06e8
Time: 2016-01-17
Author: james.hensman@gmail.com
File Name: testing/test_likelihoods.py
Class Name: TestQuadrature
Method Name: test_var_exp


Project Name: GPflow/GPflow
Commit Name: 0ede18f7755da45e8aafc0844e455a53645d06e8
Time: 2016-01-17
Author: james.hensman@gmail.com
File Name: testing/test_likelihoods.py
Class Name: TestQuadrature
Method Name: test_pred_density