Skip to content

Commit

Permalink
tflearn examples
Browse files Browse the repository at this point in the history
  • Loading branch information
ugik committed Apr 1, 2017
1 parent 3fd284d commit 40301e7
Show file tree
Hide file tree
Showing 8 changed files with 192 additions and 24 deletions.
74 changes: 74 additions & 0 deletions .ipynb_checkpoints/tflearn toy ANN reload-checkpoint.ipynb

Large diffs are not rendered by default.

32 changes: 21 additions & 11 deletions .ipynb_checkpoints/tflearn toy ANN-checkpoint.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@
},
{
"cell_type": "code",
"execution_count": 27,
"execution_count": 32,
"metadata": {
"collapsed": false
},
Expand All @@ -108,11 +108,12 @@
"name": "stdout",
"output_type": "stream",
"text": [
"Training Step: 999 | total loss: \u001b[1m\u001b[32m0.24585\u001b[0m\u001b[0m | time: 0.002s\n",
"| Adam | epoch: 500 | loss: 0.24585 - acc: 0.9570 -- iter: 16/18\n",
"Training Step: 1000 | total loss: \u001b[1m\u001b[32m0.22196\u001b[0m\u001b[0m | time: 0.005s\n",
"| Adam | epoch: 500 | loss: 0.22196 - acc: 0.9613 -- iter: 18/18\n",
"--\n"
"Training Step: 999 | total loss: \u001b[1m\u001b[32m0.00214\u001b[0m\u001b[0m | time: 0.003s\n",
"| Adam | epoch: 500 | loss: 0.00214 - acc: 1.0000 -- iter: 16/18\n",
"Training Step: 1000 | total loss: \u001b[1m\u001b[32m0.00209\u001b[0m\u001b[0m | time: 0.006s\n",
"| Adam | epoch: 500 | loss: 0.00209 - acc: 1.0000 -- iter: 18/18\n",
"--\n",
"INFO:tensorflow:/home/gk/gensim/notebooks/ANN.model is not in all_model_checkpoint_paths. Manually adding it.\n"
]
}
],
Expand All @@ -135,7 +136,7 @@
},
{
"cell_type": "code",
"execution_count": 28,
"execution_count": 33,
"metadata": {
"collapsed": false
},
Expand All @@ -144,17 +145,26 @@
"name": "stdout",
"output_type": "stream",
"text": [
"[1, 1, 1, 1, 1] [[0.9917974472045898, 0.008202536962926388]]\n",
"[1, 1, 1, 1, 0] [[0.0033489016350358725, 0.9966511130332947]]\n",
"[1, 1, 0, 0, 1] [[0.9948439598083496, 0.0051560611464083195]]\n",
"[1, 0, 0, 1, 1] [[0.9970082640647888, 0.002991726389154792]]\n"
"[1, 1, 1, 1, 1] [[0.9939707517623901, 0.006029300391674042]]\n",
"[1, 1, 1, 1, 0] [[0.0010782598983496428, 0.9989217519760132]]\n",
"[1, 1, 0, 0, 1] [[0.997883141040802, 0.0021168675739318132]]\n",
"[1, 0, 0, 1, 1] [[0.9975355863571167, 0.002464443678036332]]\n"
]
}
],
"source": [
"for i,t in enumerate(test_x):\n",
" print(test_x[i], model.predict([test_x[i]]))"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": false
},
"outputs": [],
"source": []
}
],
"metadata": {
Expand Down
Binary file added ANN.model.data-00000-of-00001
Binary file not shown.
Binary file added ANN.model.index
Binary file not shown.
Binary file added ANN.model.meta
Binary file not shown.
4 changes: 2 additions & 2 deletions checkpoint
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
model_checkpoint_path: "model.ckpt"
all_model_checkpoint_paths: "model.ckpt"
model_checkpoint_path: "/home/gk/gensim/notebooks/ANN.model"
all_model_checkpoint_paths: "/home/gk/gensim/notebooks/ANN.model"
74 changes: 74 additions & 0 deletions tflearn toy ANN reload.ipynb

Large diffs are not rendered by default.

32 changes: 21 additions & 11 deletions tflearn toy ANN.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@
},
{
"cell_type": "code",
"execution_count": 27,
"execution_count": 32,
"metadata": {
"collapsed": false
},
Expand All @@ -108,11 +108,12 @@
"name": "stdout",
"output_type": "stream",
"text": [
"Training Step: 999 | total loss: \u001b[1m\u001b[32m0.24585\u001b[0m\u001b[0m | time: 0.002s\n",
"| Adam | epoch: 500 | loss: 0.24585 - acc: 0.9570 -- iter: 16/18\n",
"Training Step: 1000 | total loss: \u001b[1m\u001b[32m0.22196\u001b[0m\u001b[0m | time: 0.005s\n",
"| Adam | epoch: 500 | loss: 0.22196 - acc: 0.9613 -- iter: 18/18\n",
"--\n"
"Training Step: 999 | total loss: \u001b[1m\u001b[32m0.00214\u001b[0m\u001b[0m | time: 0.003s\n",
"| Adam | epoch: 500 | loss: 0.00214 - acc: 1.0000 -- iter: 16/18\n",
"Training Step: 1000 | total loss: \u001b[1m\u001b[32m0.00209\u001b[0m\u001b[0m | time: 0.006s\n",
"| Adam | epoch: 500 | loss: 0.00209 - acc: 1.0000 -- iter: 18/18\n",
"--\n",
"INFO:tensorflow:/home/gk/gensim/notebooks/ANN.model is not in all_model_checkpoint_paths. Manually adding it.\n"
]
}
],
Expand All @@ -135,7 +136,7 @@
},
{
"cell_type": "code",
"execution_count": 28,
"execution_count": 33,
"metadata": {
"collapsed": false
},
Expand All @@ -144,17 +145,26 @@
"name": "stdout",
"output_type": "stream",
"text": [
"[1, 1, 1, 1, 1] [[0.9917974472045898, 0.008202536962926388]]\n",
"[1, 1, 1, 1, 0] [[0.0033489016350358725, 0.9966511130332947]]\n",
"[1, 1, 0, 0, 1] [[0.9948439598083496, 0.0051560611464083195]]\n",
"[1, 0, 0, 1, 1] [[0.9970082640647888, 0.002991726389154792]]\n"
"[1, 1, 1, 1, 1] [[0.9939707517623901, 0.006029300391674042]]\n",
"[1, 1, 1, 1, 0] [[0.0010782598983496428, 0.9989217519760132]]\n",
"[1, 1, 0, 0, 1] [[0.997883141040802, 0.0021168675739318132]]\n",
"[1, 0, 0, 1, 1] [[0.9975355863571167, 0.002464443678036332]]\n"
]
}
],
"source": [
"for i,t in enumerate(test_x):\n",
" print(test_x[i], model.predict([test_x[i]]))"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": false
},
"outputs": [],
"source": []
}
],
"metadata": {
Expand Down

0 comments on commit 40301e7

Please sign in to comment.