def test_training(self): """Tests that vectors are different before and after training.""" model = PoincareModel(self.data_large, burn_in=0, negative=3) old_vectors = np.copy(model.kv.vectors) model.train(epochs=2) self.assertFalse(np.allclose(old_vectors, model.kv.vectors))
def test_vector_shape(self): """Tests whether vectors are initialized with the correct size.""" model = PoincareModel(self.data, size=20) self.assertEqual(model.kv.vectors.shape, (7, 20))