b4da4d91f00e2b09550cb73659d53834bd180ce0,testing/test_transforms.py,TransformTests,test_tf_np_forward,#TransformTests#,11

Before Change


        x = theano.tensor.dvector()
        ys = [t.tf_forward(x) for t in self.transforms]
        fns = [theano.function([x], y) for y in ys]
        ys_theano = [f(self.x_free) for f in fns]
        ys_np = [t.forward(self.x_free) for t in self.transforms]
        for y1, y2 in zip(ys_theano, ys_np):
            self.failUnless(np.allclose(ys_theano, ys_np))
    

After Change


    def test_tf_np_forward(self):
         make sure the np forward transforms are the same as the tensorflow ones
        ys = [t.tf_forward(self.x) for t in self.transforms]
        ys_tf = [self.session.run(y, feed_dict={self.x:self.x_np}) for y in ys]
        ys_np = [t.forward(self.x_np) for t in self.transforms]
        for y1, y2 in zip(ys_tf, ys_np):
            self.failUnless(np.allclose(y1, y2))
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 4

Instances


Project Name: GPflow/GPflow
Commit Name: b4da4d91f00e2b09550cb73659d53834bd180ce0
Time: 2016-01-17
Author: james.hensman@gmail.com
File Name: testing/test_transforms.py
Class Name: TransformTests
Method Name: test_tf_np_forward


Project Name: GPflow/GPflow
Commit Name: cc5e7d00a6696a8cf6e40686455e7e034fbf26ff
Time: 2017-09-28
Author: art.art.v@gmail.com
File Name: testing/test_kerns.py
Class Name: TestAdd
Method Name: test_asym


Project Name: GPflow/GPflow
Commit Name: 49a385eae93032125a6718433b3ca1753aee3b1e
Time: 2017-11-02
Author: art.art.v@gmail.com
File Name: testing/test_method_equivalence.py
Class Name: TestEquivalence
Method Name: test_all