From 03fa41801a464311607ddb2afc8760fafbd3d9c9 Mon Sep 17 00:00:00 2001 From: fchollet Date: Fri, 8 May 2015 20:36:17 -0700 Subject: [PATCH] Update skipgram embedding example --- examples/skipgram_word_embeddings.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/examples/skipgram_word_embeddings.py b/examples/skipgram_word_embeddings.py index ca94604b7..5eb4579eb 100644 --- a/examples/skipgram_word_embeddings.py +++ b/examples/skipgram_word_embeddings.py @@ -105,8 +105,8 @@ if train_model: else: print('Build model...') model = Sequential() - model.add(WordContextProduct(max_features, proj_dim=dim_proj, init="normal")) - model.compile(loss='hinge', optimizer='adam') + model.add(WordContextProduct(max_features, proj_dim=dim_proj, init="uniform")) + model.compile(loss='mse', optimizer='rmsprop') sampling_table = sequence.make_sampling_table(max_features)