bcf6d0a188ee9ba868c1de01c347f813e3aaa35c,tests/layer/test_link_inference.py,Test_Link_Inference,test_ip,#Test_Link_Inference#,36

Before Change


    def test_ip(self):
         Test the "ip" binary operator on orthogonal vectors

        x_src = np.random.randn(self.d)
        x_src /= np.linalg.norm(x_src)  // normalize x_src
        x_dst = np.random.randn(self.d)
        x_dst -= x_dst.dot(x_src) * x_src  // make x_dst orthogonal to x_src
        x_dst /= np.linalg.norm(x_dst)  // normalize x_dst

        expected = np.dot(x_src, x_dst)

After Change


    def test_ip(self):
         Test the "ip" binary operator on orthogonal vectors

        x_src, x_dst = make_orthonormal_vectors(self.d)
        x_src = tf.constant(x_src, shape=(1, self.d), dtype="float64")
        x_dst = tf.constant(x_dst, shape=(1, self.d), dtype="float64")
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 7

Non-data size: 15

Instances


Project Name: stellargraph/stellargraph
Commit Name: bcf6d0a188ee9ba868c1de01c347f813e3aaa35c
Time: 2020-01-22
Author: andrew.docherty@data61.csiro.au
File Name: tests/layer/test_link_inference.py
Class Name: Test_Link_Inference
Method Name: test_ip


Project Name: stellargraph/stellargraph
Commit Name: bcf6d0a188ee9ba868c1de01c347f813e3aaa35c
Time: 2020-01-22
Author: andrew.docherty@data61.csiro.au
File Name: tests/layer/test_link_inference.py
Class Name: Test_Link_Classification
Method Name: test_mul_l1_l2_avg


Project Name: stellargraph/stellargraph
Commit Name: bcf6d0a188ee9ba868c1de01c347f813e3aaa35c
Time: 2020-01-22
Author: andrew.docherty@data61.csiro.au
File Name: tests/layer/test_link_inference.py
Class Name: Test_Link_Regression
Method Name: test_clip_limits


Project Name: stellargraph/stellargraph
Commit Name: bcf6d0a188ee9ba868c1de01c347f813e3aaa35c
Time: 2020-01-22
Author: andrew.docherty@data61.csiro.au
File Name: tests/layer/test_link_inference.py
Class Name: Test_Link_Inference
Method Name: test_ip


Project Name: stellargraph/stellargraph
Commit Name: bcf6d0a188ee9ba868c1de01c347f813e3aaa35c
Time: 2020-01-22
Author: andrew.docherty@data61.csiro.au
File Name: tests/layer/test_link_inference.py
Class Name: Test_Link_Regression
Method Name: test_ip


Project Name: stellargraph/stellargraph
Commit Name: bcf6d0a188ee9ba868c1de01c347f813e3aaa35c
Time: 2020-01-22
Author: andrew.docherty@data61.csiro.au
File Name: tests/layer/test_link_inference.py
Class Name: Test_Link_Regression
Method Name: test_mul_l1_l2_avg


Project Name: stellargraph/stellargraph
Commit Name: bcf6d0a188ee9ba868c1de01c347f813e3aaa35c
Time: 2020-01-22
Author: andrew.docherty@data61.csiro.au
File Name: tests/layer/test_link_inference.py
Class Name: Test_Link_Classification
Method Name: test_ip


Project Name: stellargraph/stellargraph
Commit Name: bcf6d0a188ee9ba868c1de01c347f813e3aaa35c
Time: 2020-01-22
Author: andrew.docherty@data61.csiro.au
File Name: tests/layer/test_link_inference.py
Class Name: Test_Link_Inference
Method Name: test_mul_l1_l2_avg