12장, 15장 노트북 재실행

This commit is contained in:
Haesun Park
2018-05-24 12:16:03 +09:00
parent 47da70386a
commit 8f13c59ca0
6 changed files with 439 additions and 397 deletions

View File

@@ -9,12 +9,12 @@
"name": "stdout",
"output_type": "stream",
"text": [
"CPython 3.5.5\n",
"IPython 6.3.0\n",
"CPython 3.6.5\n",
"IPython 6.4.0\n",
"\n",
"numpy 1.14.3\n",
"sklearn 0.19.1\n",
"scipy 1.0.1\n",
"scipy 1.1.0\n",
"matplotlib 2.2.2\n",
"tensorflow 1.8.0\n"
]
@@ -254,9 +254,17 @@
},
{
"cell_type": "code",
"execution_count": null,
"execution_count": 11,
"metadata": {},
"outputs": [],
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"[1.0, 6, 44]\n"
]
}
],
"source": [
"reset_graph()\n",
"\n",
@@ -271,7 +279,7 @@
},
{
"cell_type": "code",
"execution_count": 11,
"execution_count": 12,
"metadata": {},
"outputs": [
{
@@ -279,8 +287,8 @@
"output_type": "stream",
"text": [
"더 이상 읽을 파일이 없습니다\n",
"[array([[4.00000000e+00, 5.00000000e+00],\n",
" [1.00000000e+00, 1.27106565e+36]], dtype=float32), array([1, 0], dtype=int32)]\n",
"[array([[ 4., 5.],\n",
" [ 1., -1.]], dtype=float32), array([1, 0], dtype=int32)]\n",
"[array([[7., 8.]], dtype=float32), array([0], dtype=int32)]\n",
"더 이상 훈련 샘플이 없습니다\n"
]
@@ -334,7 +342,7 @@
},
{
"cell_type": "code",
"execution_count": 12,
"execution_count": 13,
"metadata": {},
"outputs": [],
"source": [
@@ -354,16 +362,16 @@
},
{
"cell_type": "code",
"execution_count": 13,
"execution_count": 14,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"[array([[4.00000000e+00, 5.00000000e+00],\n",
" [1.00000000e+00, 1.27106565e+36]], dtype=float32), array([1, 0], dtype=int32)]\n",
"[array([[7., 8.]], dtype=float32), array([0], dtype=int32)]\n",
"[array([[ 7., 8.],\n",
" [ 1., -1.]], dtype=float32), array([0, 0], dtype=int32)]\n",
"[array([[4., 5.]], dtype=float32), array([1], dtype=int32)]\n",
"더 이상 훈련 샘플이 없습니다\n"
]
}
@@ -408,15 +416,15 @@
},
{
"cell_type": "code",
"execution_count": 14,
"execution_count": 15,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"[array([[4.00000000e+00, 5.00000000e+00],\n",
" [1.00000000e+00, 1.27106565e+36]], dtype=float32), array([1, 0], dtype=int32)]\n",
"[array([[ 4., 5.],\n",
" [ 1., -1.]], dtype=float32), array([1, 0], dtype=int32)]\n",
"[array([[7., 8.]], dtype=float32), array([0], dtype=int32)]\n",
"더 이상 훈련 샘플이 없습니다\n"
]
@@ -469,7 +477,7 @@
},
{
"cell_type": "code",
"execution_count": 15,
"execution_count": 16,
"metadata": {},
"outputs": [
{
@@ -526,7 +534,7 @@
},
{
"cell_type": "code",
"execution_count": null,
"execution_count": 17,
"metadata": {},
"outputs": [],
"source": [
@@ -542,7 +550,7 @@
},
{
"cell_type": "code",
"execution_count": null,
"execution_count": 18,
"metadata": {},
"outputs": [],
"source": [
@@ -566,7 +574,7 @@
},
{
"cell_type": "code",
"execution_count": null,
"execution_count": 19,
"metadata": {},
"outputs": [],
"source": [
@@ -583,9 +591,22 @@
},
{
"cell_type": "code",
"execution_count": null,
"execution_count": 20,
"metadata": {},
"outputs": [],
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"[0 1 2 3 4 5 6]\n",
"[7 8 9 0 1 2 3]\n",
"[4 5 6 7 8 9 0]\n",
"[1 2 3 4 5 6 7]\n",
"[8 9]\n",
"완료\n"
]
}
],
"source": [
"with tf.Session() as sess:\n",
" try:\n",
@@ -611,9 +632,22 @@
},
{
"cell_type": "code",
"execution_count": null,
"execution_count": 21,
"metadata": {},
"outputs": [],
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"[array([0, 1, 2, 3, 4, 5, 6]), array([0, 1, 2, 3, 4, 5, 6])]\n",
"[array([7, 8, 9, 0, 1, 2, 3]), array([7, 8, 9, 0, 1, 2, 3])]\n",
"[array([4, 5, 6, 7, 8, 9, 0]), array([4, 5, 6, 7, 8, 9, 0])]\n",
"[array([1, 2, 3, 4, 5, 6, 7]), array([1, 2, 3, 4, 5, 6, 7])]\n",
"[array([8, 9]), array([8, 9])]\n",
"완료\n"
]
}
],
"source": [
"with tf.Session() as sess:\n",
" try:\n",
@@ -632,7 +666,7 @@
},
{
"cell_type": "code",
"execution_count": null,
"execution_count": 22,
"metadata": {},
"outputs": [],
"source": [
@@ -641,7 +675,7 @@
},
{
"cell_type": "code",
"execution_count": null,
"execution_count": 23,
"metadata": {},
"outputs": [],
"source": [
@@ -657,9 +691,17 @@
},
{
"cell_type": "code",
"execution_count": null,
"execution_count": 24,
"metadata": {},
"outputs": [],
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"0,1,7,8,4,5,2,3,9,0,6,7,4,5,1,2,8,9,6,3,0,1,2,8,9,3,4,5,6,7,완료\n"
]
}
],
"source": [
"with tf.Session() as sess:\n",
" try:\n",
@@ -692,7 +734,7 @@
},
{
"cell_type": "code",
"execution_count": null,
"execution_count": 25,
"metadata": {},
"outputs": [],
"source": [
@@ -701,7 +743,7 @@
},
{
"cell_type": "code",
"execution_count": null,
"execution_count": 26,
"metadata": {},
"outputs": [],
"source": [
@@ -710,7 +752,7 @@
},
{
"cell_type": "code",
"execution_count": null,
"execution_count": 27,
"metadata": {},
"outputs": [],
"source": [
@@ -726,7 +768,7 @@
},
{
"cell_type": "code",
"execution_count": null,
"execution_count": 28,
"metadata": {},
"outputs": [],
"source": [
@@ -746,7 +788,7 @@
},
{
"cell_type": "code",
"execution_count": null,
"execution_count": 29,
"metadata": {},
"outputs": [],
"source": [
@@ -762,7 +804,7 @@
},
{
"cell_type": "code",
"execution_count": null,
"execution_count": 30,
"metadata": {},
"outputs": [],
"source": [
@@ -772,9 +814,20 @@
},
{
"cell_type": "code",
"execution_count": null,
"execution_count": 31,
"metadata": {},
"outputs": [],
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"[ 1. -1.] 0.0\n",
"[4. 5.] 1.0\n",
"[7. 8.] 0.0\n",
"완료\n"
]
}
],
"source": [
"with tf.Session() as sess:\n",
" try:\n",
@@ -818,7 +871,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.5.5"
"version": "3.6.5"
},
"nav_menu": {},
"toc": {