This commit is contained in:
codekansas
2016-04-25 00:46:33 -04:00
parent 07aab86bb2
commit 3075ffcf54
2 changed files with 2 additions and 2 deletions
+1 -1
View File
@@ -184,7 +184,7 @@ test_model.load_weights(os.path.join(models_path, 'iqa_model_for_prediction.h5')
# found through experimentation that ~24 epochs generalized the best
print('Fitting model')
for i in range(30):
for i in range(10000):
print('----- %d -----' % i)
np.random.shuffle(ab_data)
train_model.fit([q_data, ag_data, ab_data], targets, nb_epoch=1, batch_size=128, validation_data=[[qv_data, avg_data, avb_data], v_targets], shuffle=True)
+1 -1
View File
@@ -82,7 +82,7 @@ def make_model(maxlen_question, maxlen_answer, n_words, n_lstm_dims=141, n_embed
# merge together
# note: `cos` refers to "cosine similarity", i.e. similar vectors should go to 1
# for training's sake, "abs" limits range to be tween 0 and 1 (binary classification)
# for training's sake, "abs" limits range to between 0 and 1 (binary classification)
good_out = merge([q_out, ag_out], name='good', mode='cos', dot_axes=1)
bad_out = merge([q_out, ab_out], name='bad', mode='cos', dot_axes=1)