Beispiel #1
0
 def init_embeddings(self):
     print("\n!!!! init embeddings !!!!\n")
     entity_embeddings_nparray = util.load_ent_vecs(self.args)
     self.sess.run(self.entity_embedding_init,
                   feed_dict={
                       self.entity_embeddings_placeholder:
                       entity_embeddings_nparray
                   })
    def init_embeddings(self):
        print("\n!!!! init embeddings !!!!\n")
        # read the numpy file
        embeddings_nparray = np.load(config.base_folder +"data/tfrecords/" + self.language + "/" + self.args.experiment_name +
                                     "/embeddings_array.npy")
        self.sess.run(self.word_embedding_init, feed_dict={self.word_embeddings_placeholder: embeddings_nparray})

        entity_embeddings_nparray = util.load_ent_vecs(self.args)
        self.sess.run(self.entity_embedding_init, feed_dict={self.entity_embeddings_placeholder: entity_embeddings_nparray})