Skip to content

Commit 40301e7

Browse files
author
ugik
committed
tflearn examples
1 parent 3fd284d commit 40301e7

File tree

8 files changed

+192
-24
lines changed

8 files changed

+192
-24
lines changed

.ipynb_checkpoints/tflearn toy ANN reload-checkpoint.ipynb

Lines changed: 74 additions & 0 deletions
Large diffs are not rendered by default.

.ipynb_checkpoints/tflearn toy ANN-checkpoint.ipynb

Lines changed: 21 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@
9999
},
100100
{
101101
"cell_type": "code",
102-
"execution_count": 27,
102+
"execution_count": 32,
103103
"metadata": {
104104
"collapsed": false
105105
},
@@ -108,11 +108,12 @@
108108
"name": "stdout",
109109
"output_type": "stream",
110110
"text": [
111-
"Training Step: 999 | total loss: \u001b[1m\u001b[32m0.24585\u001b[0m\u001b[0m | time: 0.002s\n",
112-
"| Adam | epoch: 500 | loss: 0.24585 - acc: 0.9570 -- iter: 16/18\n",
113-
"Training Step: 1000 | total loss: \u001b[1m\u001b[32m0.22196\u001b[0m\u001b[0m | time: 0.005s\n",
114-
"| Adam | epoch: 500 | loss: 0.22196 - acc: 0.9613 -- iter: 18/18\n",
115-
"--\n"
111+
"Training Step: 999 | total loss: \u001b[1m\u001b[32m0.00214\u001b[0m\u001b[0m | time: 0.003s\n",
112+
"| Adam | epoch: 500 | loss: 0.00214 - acc: 1.0000 -- iter: 16/18\n",
113+
"Training Step: 1000 | total loss: \u001b[1m\u001b[32m0.00209\u001b[0m\u001b[0m | time: 0.006s\n",
114+
"| Adam | epoch: 500 | loss: 0.00209 - acc: 1.0000 -- iter: 18/18\n",
115+
"--\n",
116+
"INFO:tensorflow:/home/gk/gensim/notebooks/ANN.model is not in all_model_checkpoint_paths. Manually adding it.\n"
116117
]
117118
}
118119
],
@@ -135,7 +136,7 @@
135136
},
136137
{
137138
"cell_type": "code",
138-
"execution_count": 28,
139+
"execution_count": 33,
139140
"metadata": {
140141
"collapsed": false
141142
},
@@ -144,17 +145,26 @@
144145
"name": "stdout",
145146
"output_type": "stream",
146147
"text": [
147-
"[1, 1, 1, 1, 1] [[0.9917974472045898, 0.008202536962926388]]\n",
148-
"[1, 1, 1, 1, 0] [[0.0033489016350358725, 0.9966511130332947]]\n",
149-
"[1, 1, 0, 0, 1] [[0.9948439598083496, 0.0051560611464083195]]\n",
150-
"[1, 0, 0, 1, 1] [[0.9970082640647888, 0.002991726389154792]]\n"
148+
"[1, 1, 1, 1, 1] [[0.9939707517623901, 0.006029300391674042]]\n",
149+
"[1, 1, 1, 1, 0] [[0.0010782598983496428, 0.9989217519760132]]\n",
150+
"[1, 1, 0, 0, 1] [[0.997883141040802, 0.0021168675739318132]]\n",
151+
"[1, 0, 0, 1, 1] [[0.9975355863571167, 0.002464443678036332]]\n"
151152
]
152153
}
153154
],
154155
"source": [
155156
"for i,t in enumerate(test_x):\n",
156157
" print(test_x[i], model.predict([test_x[i]]))"
157158
]
159+
},
160+
{
161+
"cell_type": "code",
162+
"execution_count": null,
163+
"metadata": {
164+
"collapsed": false
165+
},
166+
"outputs": [],
167+
"source": []
158168
}
159169
],
160170
"metadata": {

ANN.model.data-00000-of-00001

15.4 KB
Binary file not shown.

ANN.model.index

893 Bytes
Binary file not shown.

ANN.model.meta

128 KB
Binary file not shown.

checkpoint

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
model_checkpoint_path: "model.ckpt"
2-
all_model_checkpoint_paths: "model.ckpt"
1+
model_checkpoint_path: "/home/gk/gensim/notebooks/ANN.model"
2+
all_model_checkpoint_paths: "/home/gk/gensim/notebooks/ANN.model"

tflearn toy ANN reload.ipynb

Lines changed: 74 additions & 0 deletions
Large diffs are not rendered by default.

tflearn toy ANN.ipynb

Lines changed: 21 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@
9999
},
100100
{
101101
"cell_type": "code",
102-
"execution_count": 27,
102+
"execution_count": 32,
103103
"metadata": {
104104
"collapsed": false
105105
},
@@ -108,11 +108,12 @@
108108
"name": "stdout",
109109
"output_type": "stream",
110110
"text": [
111-
"Training Step: 999 | total loss: \u001b[1m\u001b[32m0.24585\u001b[0m\u001b[0m | time: 0.002s\n",
112-
"| Adam | epoch: 500 | loss: 0.24585 - acc: 0.9570 -- iter: 16/18\n",
113-
"Training Step: 1000 | total loss: \u001b[1m\u001b[32m0.22196\u001b[0m\u001b[0m | time: 0.005s\n",
114-
"| Adam | epoch: 500 | loss: 0.22196 - acc: 0.9613 -- iter: 18/18\n",
115-
"--\n"
111+
"Training Step: 999 | total loss: \u001b[1m\u001b[32m0.00214\u001b[0m\u001b[0m | time: 0.003s\n",
112+
"| Adam | epoch: 500 | loss: 0.00214 - acc: 1.0000 -- iter: 16/18\n",
113+
"Training Step: 1000 | total loss: \u001b[1m\u001b[32m0.00209\u001b[0m\u001b[0m | time: 0.006s\n",
114+
"| Adam | epoch: 500 | loss: 0.00209 - acc: 1.0000 -- iter: 18/18\n",
115+
"--\n",
116+
"INFO:tensorflow:/home/gk/gensim/notebooks/ANN.model is not in all_model_checkpoint_paths. Manually adding it.\n"
116117
]
117118
}
118119
],
@@ -135,7 +136,7 @@
135136
},
136137
{
137138
"cell_type": "code",
138-
"execution_count": 28,
139+
"execution_count": 33,
139140
"metadata": {
140141
"collapsed": false
141142
},
@@ -144,17 +145,26 @@
144145
"name": "stdout",
145146
"output_type": "stream",
146147
"text": [
147-
"[1, 1, 1, 1, 1] [[0.9917974472045898, 0.008202536962926388]]\n",
148-
"[1, 1, 1, 1, 0] [[0.0033489016350358725, 0.9966511130332947]]\n",
149-
"[1, 1, 0, 0, 1] [[0.9948439598083496, 0.0051560611464083195]]\n",
150-
"[1, 0, 0, 1, 1] [[0.9970082640647888, 0.002991726389154792]]\n"
148+
"[1, 1, 1, 1, 1] [[0.9939707517623901, 0.006029300391674042]]\n",
149+
"[1, 1, 1, 1, 0] [[0.0010782598983496428, 0.9989217519760132]]\n",
150+
"[1, 1, 0, 0, 1] [[0.997883141040802, 0.0021168675739318132]]\n",
151+
"[1, 0, 0, 1, 1] [[0.9975355863571167, 0.002464443678036332]]\n"
151152
]
152153
}
153154
],
154155
"source": [
155156
"for i,t in enumerate(test_x):\n",
156157
" print(test_x[i], model.predict([test_x[i]]))"
157158
]
159+
},
160+
{
161+
"cell_type": "code",
162+
"execution_count": null,
163+
"metadata": {
164+
"collapsed": false
165+
},
166+
"outputs": [],
167+
"source": []
158168
}
159169
],
160170
"metadata": {

0 commit comments

Comments
 (0)