14278151373a35f7ad805cbcc3eed2ffb4e995e9,tests/test_embeddings.py,,,#,29

Before Change


        norm = np.linalg.norm(K.get_value(lookup.params[0]), axis=1)
        self.assertTrue(np.allclose(norm, np.ones_like(norm).astype("float32")))

if __name__ == "__main__":
    unittest.main()

After Change


from keras import backend as K


X1 = np.array([[1], [2]], dtype="int32")
W1 = np.array([[0.1, 0.2], [0.3, 0.4], [0.5, 0.6]], dtype="float32")


def test_unitnorm_constraint():
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 4

Non-data size: 7

Instances


Project Name: keras-team/keras
Commit Name: 14278151373a35f7ad805cbcc3eed2ffb4e995e9
Time: 2015-12-05
Author: francois.chollet@gmail.com
File Name: tests/test_embeddings.py
Class Name:
Method Name:


Project Name: nicodv/kmodes
Commit Name: cb92fd7bef3392543cc1e62af14051be0286d680
Time: 2016-02-26
Author: nico.devos@autogrid.com
File Name: kmodes/tests/test_kmodes.py
Class Name:
Method Name:


Project Name: geomstats/geomstats
Commit Name: 0525577f70fec380ae116c51c7a5a6979800d285
Time: 2020-01-15
Author: opeltre@gmail.com
File Name: tests/test_grassmannian.py
Class Name:
Method Name:


Project Name: nicodv/kmodes
Commit Name: cb92fd7bef3392543cc1e62af14051be0286d680
Time: 2016-02-26
Author: nico.devos@autogrid.com
File Name: kmodes/tests/test_kprototypes.py
Class Name:
Method Name: