Skip to content

Commit

Permalink
Update notebooks
Browse files Browse the repository at this point in the history
  • Loading branch information
anargyri authored Sep 8, 2017
1 parent 7ab819c commit 715de11
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 62 deletions.
16 changes: 0 additions & 16 deletions hatt_train.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -2537,22 +2537,6 @@
"np.save('/data/tmp/embedding_matrix', embedding_matrix)"
]
},
{
"cell_type": "code",
"execution_count": 4,
"metadata": {
"collapsed": true,
"deletable": true,
"editable": true
},
"outputs": [],
"source": [
"x_train = np.load('/data/tmp/x_train.npy')\n",
"y_train = np.load('/data/tmp/y_train.npy')\n",
"reviews = np.load('/data/tmp/reviews.npy')\n",
"embedding_matrix = np.load('/data/tmp/embedding_matrix.npy')"
]
},
{
"cell_type": "code",
"execution_count": 5,
Expand Down
49 changes: 3 additions & 46 deletions lstm_word2vec.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -1317,7 +1317,6 @@
"source": [
"BATCH_SIZE = 100\n",
"NUM_EPOCHS = 10\n",
"REG_PARAMS = [1e-7, 1e-3, 1e1]\n",
"LSTM_DIM = 100\n",
"OPTIMIZER = SGD(lr=0.01, nesterov=True)"
]
Expand Down Expand Up @@ -1380,30 +1379,6 @@
" res_file.write(str(history.history))"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": false,
"deletable": true,
"editable": true
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"Epoch 1/10\n",
"16017s - loss: 1.1015 - acc: 0.5225\n",
"Epoch 4/10\n"
]
}
],
"source": [
"for reg_param in REG_PARAMS:\n",
" lstm_create_train(reg_param)"
]
},
{
"cell_type": "code",
"execution_count": null,
Expand Down Expand Up @@ -1439,31 +1414,13 @@
"# Tensorflow automatically uses several cores and one GPU of the DSVM. "
]
},
{
"cell_type": "code",
"execution_count": 52,
"metadata": {
"collapsed": false
},
"outputs": [
{
"name": "stderr",
"output_type": "stream",
"text": [
"/anaconda/envs/py35/lib/python3.5/site-packages/keras/models.py:281: UserWarning: Error in loading the saved optimizer state. As a result, your model is starting with a freshly initialized optimizer.\n",
" warnings.warn('Error in loading the saved optimizer '\n"
]
}
],
"source": [
"model = load_model('model_wvec_1e-10.h5')"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": false
"collapsed": false,
"deletable": true,
"editable": true
},
"outputs": [],
"source": []
Expand Down

0 comments on commit 715de11

Please sign in to comment.