added word embeddings

This commit is contained in:
codekansas
2016-05-04 11:42:17 -04:00
parent 894dc21914
commit 54e6dfd478
2 changed files with 1 additions and 1 deletions
+1 -1
View File
@@ -264,7 +264,7 @@ if __name__ == '__main__':
# np.save(open('models/embedding_200_dim.h5', 'wb'), weights)
# load pre-trained embedding layer
weights = np.load('word2vec_100_dim.h5')
weights = np.load('word2vec_100_dim.embeddings')
language_model = model.prediction_model.layers[2]
language_model.layers[2].set_weights([weights])
BIN
View File
Binary file not shown.