You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@madlib.apache.org by fm...@apache.org on 2020/03/24 23:50:30 UTC
[madlib-site] branch asf-site updated: fix output and plots in
cifar10 model selection workbook
This is an automated email from the ASF dual-hosted git repository.
fmcquillan pushed a commit to branch asf-site
in repository https://gitbox.apache.org/repos/asf/madlib-site.git
The following commit(s) were added to refs/heads/asf-site by this push:
new 6e10e65 fix output and plots in cifar10 model selection workbook
6e10e65 is described below
commit 6e10e65b0e4978c5280ce74aefe458a414e41a53
Author: Frank McQuillan <fm...@pivotal.io>
AuthorDate: Tue Mar 24 16:47:18 2020 -0700
fix output and plots in cifar10 model selection workbook
---
...Dlib-Keras-model-selection-CNN-cifar10-v1.ipynb | 3975 +++-----------------
1 file changed, 438 insertions(+), 3537 deletions(-)
diff --git a/community-artifacts/Deep-learning/MADlib-Keras-model-selection-CNN-cifar10-v1.ipynb b/community-artifacts/Deep-learning/MADlib-Keras-model-selection-CNN-cifar10-v1.ipynb
index 70b9129..5035e3c 100755
--- a/community-artifacts/Deep-learning/MADlib-Keras-model-selection-CNN-cifar10-v1.ipynb
+++ b/community-artifacts/Deep-learning/MADlib-Keras-model-selection-CNN-cifar10-v1.ipynb
@@ -53,18 +53,7 @@
"cell_type": "code",
"execution_count": 2,
"metadata": {},
- "outputs": [
- {
- "data": {
- "text/plain": [
- "u'Connected: gpadmin@cifar_places'"
- ]
- },
- "execution_count": 2,
- "metadata": {},
- "output_type": "execute_result"
- }
- ],
+ "outputs": [],
"source": [
"# Greenplum Database 5.x on GCP - via tunnel\n",
"%sql postgresql://gpadmin@localhost:8000/cifar_places\n",
@@ -82,7 +71,6 @@
"name": "stdout",
"output_type": "stream",
"text": [
- " * postgresql://gpadmin@localhost:8000/cifar_places\n",
"1 rows affected.\n"
]
},
@@ -229,14 +217,13 @@
},
{
"cell_type": "code",
- "execution_count": 7,
+ "execution_count": 6,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
- " * postgresql://gpadmin@localhost:8000/cifar_places\n",
"1 rows affected.\n"
]
},
@@ -256,7 +243,7 @@
"[(50000L,)]"
]
},
- "execution_count": 7,
+ "execution_count": 6,
"metadata": {},
"output_type": "execute_result"
}
@@ -267,14 +254,13 @@
},
{
"cell_type": "code",
- "execution_count": 8,
+ "execution_count": 7,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
- " * postgresql://gpadmin@localhost:8000/cifar_places\n",
"1 rows affected.\n"
]
},
@@ -294,7 +280,7 @@
"[(10000L,)]"
]
},
- "execution_count": 8,
+ "execution_count": 7,
"metadata": {},
"output_type": "execute_result"
}
@@ -317,14 +303,13 @@
},
{
"cell_type": "code",
- "execution_count": 9,
+ "execution_count": 8,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
- " * postgresql://gpadmin@localhost:8000/cifar_places\n",
"Done.\n",
"1 rows affected.\n",
"20 rows affected.\n"
@@ -443,7 +428,7 @@
" (u'gpsix4', u'device: 3, name: Tesla P100-PCIE-16GB, pci bus id: 0000:00:07.0, compute capability: 6.0')]"
]
},
- "execution_count": 9,
+ "execution_count": 8,
"metadata": {},
"output_type": "execute_result"
}
@@ -464,14 +449,13 @@
},
{
"cell_type": "code",
- "execution_count": 10,
+ "execution_count": 9,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
- " * postgresql://gpadmin@localhost:8000/cifar_places\n",
"21 rows affected.\n"
]
},
@@ -769,7 +753,7 @@
" (21, 19, u'p', u'p', u'n', u'u', 40003, u'gpsix4', u'gpsix4', u'/data/primary3/gpseg19')]"
]
},
- "execution_count": 10,
+ "execution_count": 9,
"metadata": {},
"output_type": "execute_result"
}
@@ -790,14 +774,13 @@
},
{
"cell_type": "code",
- "execution_count": 11,
+ "execution_count": 10,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
- " * postgresql://gpadmin@localhost:8000/cifar_places\n",
"Done.\n",
"16 rows affected.\n",
"16 rows affected.\n"
@@ -896,7 +879,7 @@
" (17, u'gpsix3')]"
]
},
- "execution_count": 11,
+ "execution_count": 10,
"metadata": {},
"output_type": "execute_result"
}
@@ -919,14 +902,13 @@
},
{
"cell_type": "code",
- "execution_count": 16,
+ "execution_count": 11,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
- " * postgresql://gpadmin@localhost:8000/cifar_places\n",
"Done.\n",
"1 rows affected.\n",
"16 rows affected.\n"
@@ -1059,7 +1041,7 @@
" (56, [3125, 32, 32, 3], [3125, 10], 2)]"
]
},
- "execution_count": 16,
+ "execution_count": 11,
"metadata": {},
"output_type": "execute_result"
}
@@ -1083,14 +1065,13 @@
},
{
"cell_type": "code",
- "execution_count": 17,
+ "execution_count": 12,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
- " * postgresql://gpadmin@localhost:8000/cifar_places\n",
"1 rows affected.\n"
]
},
@@ -1130,7 +1111,7 @@
"[(u'cifar10_train', u'cifar10_train_packed', u'y', u'x', u'smallint', [0, 1, 2, 3, 4, 5, 6, 7, 8, 9], 3125, 256.0, 10, [2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17], [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15])]"
]
},
- "execution_count": 17,
+ "execution_count": 12,
"metadata": {},
"output_type": "execute_result"
}
@@ -1149,14 +1130,13 @@
},
{
"cell_type": "code",
- "execution_count": 18,
+ "execution_count": 13,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
- " * postgresql://gpadmin@localhost:8000/cifar_places\n",
"Done.\n",
"1 rows affected.\n",
"16 rows affected.\n"
@@ -1289,7 +1269,7 @@
" (56, [625, 32, 32, 3], [625, 10], 2)]"
]
},
- "execution_count": 18,
+ "execution_count": 13,
"metadata": {},
"output_type": "execute_result"
}
@@ -1312,14 +1292,13 @@
},
{
"cell_type": "code",
- "execution_count": 19,
+ "execution_count": 14,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
- " * postgresql://gpadmin@localhost:8000/cifar_places\n",
"1 rows affected.\n"
]
},
@@ -1359,7 +1338,7 @@
"[(u'cifar10_val', u'cifar10_val_packed', u'y', u'x', u'smallint', [0, 1, 2, 3, 4, 5, 6, 7, 8, 9], 625, 256.0, 10, [2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17], [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15])]"
]
},
- "execution_count": 19,
+ "execution_count": 14,
"metadata": {},
"output_type": "execute_result"
}
@@ -1381,7 +1360,7 @@
},
{
"cell_type": "code",
- "execution_count": 24,
+ "execution_count": 15,
"metadata": {},
"outputs": [],
"source": [
@@ -1390,7 +1369,7 @@
},
{
"cell_type": "code",
- "execution_count": 25,
+ "execution_count": 18,
"metadata": {},
"outputs": [
{
@@ -1484,7 +1463,7 @@
},
{
"cell_type": "code",
- "execution_count": 26,
+ "execution_count": 19,
"metadata": {},
"outputs": [
{
@@ -1493,7 +1472,7 @@
"'{\"class_name\": \"Sequential\", \"keras_version\": \"2.2.4\", \"config\": {\"layers\": [{\"class_name\": \"Conv2D\", \"config\": {\"kernel_initializer\": {\"class_name\": \"VarianceScaling\", \"config\": {\"distribution\": \"uniform\", \"scale\": 1.0, \"seed\": null, \"mode\": \"fan_avg\"}}, \"name\": \"conv2d_1\", \"kernel_constraint\": null, \"bias_regularizer\": null, \"bias_constraint\": null, \"dtype\": \"float32\", \"activation\": \"linear\", \"trainable\": true, \"data_f [...]
]
},
- "execution_count": 26,
+ "execution_count": 19,
"metadata": {},
"output_type": "execute_result"
}
@@ -1511,7 +1490,7 @@
},
{
"cell_type": "code",
- "execution_count": 27,
+ "execution_count": 20,
"metadata": {},
"outputs": [
{
@@ -1610,7 +1589,7 @@
},
{
"cell_type": "code",
- "execution_count": 28,
+ "execution_count": 21,
"metadata": {},
"outputs": [
{
@@ -1619,7 +1598,7 @@
"'{\"class_name\": \"Sequential\", \"keras_version\": \"2.2.4\", \"config\": {\"layers\": [{\"class_name\": \"Conv2D\", \"config\": {\"kernel_initializer\": {\"class_name\": \"VarianceScaling\", \"config\": {\"distribution\": \"uniform\", \"scale\": 2.0, \"seed\": null, \"mode\": \"fan_in\"}}, \"name\": \"conv2d_5\", \"kernel_constraint\": null, \"bias_regularizer\": null, \"bias_constraint\": null, \"dtype\": \"float32\", \"activation\": \"relu\", \"trainable\": true, \"data_form [...]
]
},
- "execution_count": 28,
+ "execution_count": 21,
"metadata": {},
"output_type": "execute_result"
}
@@ -1637,7 +1616,7 @@
},
{
"cell_type": "code",
- "execution_count": 29,
+ "execution_count": 22,
"metadata": {},
"outputs": [
{
@@ -1711,16 +1690,16 @@
},
{
"cell_type": "code",
- "execution_count": 18,
+ "execution_count": 23,
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
- "'{\"class_name\": \"Sequential\", \"keras_version\": \"2.1.6\", \"config\": [{\"class_name\": \"Conv2D\", \"config\": {\"kernel_initializer\": {\"class_name\": \"VarianceScaling\", \"config\": {\"distribution\": \"uniform\", \"scale\": 2.0, \"seed\": null, \"mode\": \"fan_in\"}}, \"name\": \"conv2d_17\", \"kernel_constraint\": null, \"bias_regularizer\": null, \"bias_constraint\": null, \"dtype\": \"float32\", \"activation\": \"relu\", \"trainable\": true, \"data_format\": \"chan [...]
+ "'{\"class_name\": \"Sequential\", \"keras_version\": \"2.2.4\", \"config\": {\"layers\": [{\"class_name\": \"Conv2D\", \"config\": {\"kernel_initializer\": {\"class_name\": \"VarianceScaling\", \"config\": {\"distribution\": \"uniform\", \"scale\": 2.0, \"seed\": null, \"mode\": \"fan_in\"}}, \"name\": \"conv2d_11\", \"kernel_constraint\": null, \"bias_regularizer\": null, \"bias_constraint\": null, \"dtype\": \"float32\", \"activation\": \"relu\", \"trainable\": true, \"data_for [...]
]
},
- "execution_count": 18,
+ "execution_count": 23,
"metadata": {},
"output_type": "execute_result"
}
@@ -1738,14 +1717,13 @@
},
{
"cell_type": "code",
- "execution_count": 31,
+ "execution_count": 24,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
- " * postgresql://gpadmin@localhost:8000/cifar_places\n",
"Done.\n"
]
},
@@ -1755,7 +1733,7 @@
"[]"
]
},
- "execution_count": 31,
+ "execution_count": 24,
"metadata": {},
"output_type": "execute_result"
},
@@ -1763,7 +1741,6 @@
"name": "stdout",
"output_type": "stream",
"text": [
- " * postgresql://gpadmin@localhost:8000/cifar_places\n",
"3 rows affected.\n"
]
},
@@ -1795,7 +1772,7 @@
" (3, u'CNN from Jason Brownlee blog post - no batch normalization')]"
]
},
- "execution_count": 31,
+ "execution_count": 24,
"metadata": {},
"output_type": "execute_result"
}
@@ -1841,14 +1818,13 @@
},
{
"cell_type": "code",
- "execution_count": 32,
+ "execution_count": 25,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
- " * postgresql://gpadmin@localhost:8000/cifar_places\n",
"Done.\n",
"1 rows affected.\n",
"16 rows affected.\n"
@@ -1981,7 +1957,7 @@
" (16, 2, u\"loss='categorical_crossentropy',optimizer='adam(lr=0.001)',metrics=['accuracy']\", u'batch_size=128,epochs=5')]"
]
},
- "execution_count": 32,
+ "execution_count": 25,
"metadata": {},
"output_type": "execute_result"
}
@@ -2017,14 +1993,13 @@
},
{
"cell_type": "code",
- "execution_count": 33,
+ "execution_count": 26,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
- " * postgresql://gpadmin@localhost:8000/cifar_places\n",
"1 rows affected.\n"
]
},
@@ -2044,7 +2019,7 @@
"[(u'model_arch_library',)]"
]
},
- "execution_count": 33,
+ "execution_count": 26,
"metadata": {},
"output_type": "execute_result"
}
@@ -2120,14 +2095,13 @@
},
{
"cell_type": "code",
- "execution_count": 34,
+ "execution_count": 27,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
- " * postgresql://gpadmin@localhost:8000/cifar_places\n",
"1 rows affected.\n"
]
},
@@ -2170,8 +2144,8 @@
" <td>False</td>\n",
" <td>None</td>\n",
" <td>None</td>\n",
- " <td>2020-03-17 23:21:35.497938</td>\n",
- " <td>2020-03-17 23:50:01.109448</td>\n",
+ " <td>2020-03-24 22:19:52.670763</td>\n",
+ " <td>2020-03-24 22:48:08.984136</td>\n",
" <td>1.17-dev</td>\n",
" <td>10</td>\n",
" <td>[0, 1, 2, 3, 4, 5, 6, 7, 8, 9]</td>\n",
@@ -2182,10 +2156,10 @@
"</table>"
],
"text/plain": [
- "[(u'cifar10_train_packed', u'cifar10_val_packed', u'cifar10_multi_model', u'cifar10_multi_model_info', u'y', u'x', u'model_arch_library', 10, 1, False, None, None, datetime.datetime(2020, 3, 17, 23, 21, 35, 497938), datetime.datetime(2020, 3, 17, 23, 50, 1, 109448), u'1.17-dev', 10, [0, 1, 2, 3, 4, 5, 6, 7, 8, 9], u'smallint', 256.0, [1, 2, 3, 4, 5, 6, 7, 8, 9, 10])]"
+ "[(u'cifar10_train_packed', u'cifar10_val_packed', u'cifar10_multi_model', u'cifar10_multi_model_info', u'y', u'x', u'model_arch_library', 10, 1, False, None, None, datetime.datetime(2020, 3, 24, 22, 19, 52, 670763), datetime.datetime(2020, 3, 24, 22, 48, 8, 984136), u'1.17-dev', 10, [0, 1, 2, 3, 4, 5, 6, 7, 8, 9], u'smallint', 256.0, [1, 2, 3, 4, 5, 6, 7, 8, 9, 10])]"
]
},
- "execution_count": 34,
+ "execution_count": 27,
"metadata": {},
"output_type": "execute_result"
}
@@ -2204,7 +2178,7 @@
},
{
"cell_type": "code",
- "execution_count": 37,
+ "execution_count": 28,
"metadata": {
"scrolled": true
},
@@ -2213,7 +2187,6 @@
"name": "stdout",
"output_type": "stream",
"text": [
- " * postgresql://gpadmin@localhost:8000/cifar_places\n",
"16 rows affected.\n"
]
},
@@ -2240,112 +2213,112 @@
" <th>validation_loss</th>\n",
" </tr>\n",
" <tr>\n",
- " <td>15</td>\n",
+ " <td>16</td>\n",
" <td>2</td>\n",
" <td>loss='categorical_crossentropy',optimizer='adam(lr=0.001)',metrics=['accuracy']</td>\n",
- " <td>batch_size=64,epochs=5</td>\n",
+ " <td>batch_size=128,epochs=5</td>\n",
" <td>madlib_keras</td>\n",
" <td>2159.70019531</td>\n",
- " <td>[160.21645283699, 325.693609952927, 493.035051822662, 661.953631877899, 831.346253871918, 1001.65144181252, 1171.72806191444, 1342.43474984169, 1515.81184601784, 1689.71926879883]</td>\n",
+ " <td>[167.736330986023, 333.425091981888, 500.695713996887, 668.302587985992, 837.287312984467, 1006.06942605972, 1176.67615294456, 1346.787348032, 1518.12181210518, 1690.67020988464]</td>\n",
" <td>[u'accuracy']</td>\n",
- " <td>0.958739995956</td>\n",
- " <td>0.12002915144</td>\n",
- " <td>[0.779980003833771, 0.845019996166229, 0.873939990997314, 0.893540024757385, 0.905359983444214, 0.92519998550415, 0.942740023136139, 0.936339974403381, 0.944379985332489, 0.958739995956421]</td>\n",
- " <td>[0.63620263338089, 0.451914638280869, 0.365966022014618, 0.304257303476334, 0.272642701864243, 0.214935272932053, 0.167475894093513, 0.184087827801704, 0.162149116396904, 0.120029151439667]</td>\n",
- " <td>0.838599979877</td>\n",
- " <td>0.570000112057</td>\n",
- " <td>[0.749100029468536, 0.795099973678589, 0.809499979019165, 0.814599990844727, 0.817300021648407, 0.825900018215179, 0.831399977207184, 0.829599976539612, 0.826099991798401, 0.838599979877472]</td>\n",
- " <td>[0.729304790496826, 0.612815201282501, 0.598590016365051, 0.574969530105591, 0.585948467254639, 0.566278994083405, 0.566746890544891, 0.570696115493774, 0.600630104541779, 0.570000112056732]</td>\n",
+ " <td>0.957840025425</td>\n",
+ " <td>0.121589891613</td>\n",
+ " <td>[0.769860029220581, 0.824000000953674, 0.873139977455139, 0.89300000667572, 0.895640015602112, 0.906700015068054, 0.931919991970062, 0.942839980125427, 0.940620005130768, 0.957840025424957]</td>\n",
+ " <td>[0.66564804315567, 0.511175155639648, 0.367111206054688, 0.307224303483963, 0.300335615873337, 0.268611431121826, 0.196494549512863, 0.165175542235374, 0.172968357801437, 0.12158989161253]</td>\n",
+ " <td>0.836000025272</td>\n",
+ " <td>0.582142531872</td>\n",
+ " <td>[0.742699980735779, 0.790499985218048, 0.808600008487701, 0.818700015544891, 0.822000026702881, 0.821699976921082, 0.831499993801117, 0.83569997549057, 0.83050000667572, 0.836000025272369]</td>\n",
+ " <td>[0.731135308742523, 0.629253566265106, 0.586650609970093, 0.561055064201355, 0.600637912750244, 0.576708614826202, 0.567015171051025, 0.560995817184448, 0.577787160873413, 0.582142531871796]</td>\n",
" </tr>\n",
" <tr>\n",
- " <td>16</td>\n",
+ " <td>14</td>\n",
" <td>2</td>\n",
- " <td>loss='categorical_crossentropy',optimizer='adam(lr=0.001)',metrics=['accuracy']</td>\n",
+ " <td>loss='categorical_crossentropy',optimizer='rmsprop(lr=0.001, decay=1e-6)',metrics=['accuracy']</td>\n",
" <td>batch_size=128,epochs=5</td>\n",
" <td>madlib_keras</td>\n",
" <td>2159.70019531</td>\n",
- " <td>[168.006911993027, 334.143662929535, 501.23655295372, 670.235726833344, 840.096035003662, 1010.38422298431, 1180.51074194908, 1351.65223288536, 1524.53146886826, 1699.84652090073]</td>\n",
+ " <td>[161.545518875122, 327.271953105927, 493.721956014633, 662.059704065323, 830.583410024643, 999.47811293602, 1170.08322310448, 1339.875207901, 1511.35515999794, 1682.88088107109]</td>\n",
" <td>[u'accuracy']</td>\n",
- " <td>0.959839999676</td>\n",
- " <td>0.119847580791</td>\n",
- " <td>[0.763499975204468, 0.829859972000122, 0.858560025691986, 0.889379978179932, 0.903039991855621, 0.922519981861115, 0.938279986381531, 0.941100001335144, 0.953220009803772, 0.959839999675751]</td>\n",
- " <td>[0.676432132720947, 0.491187304258347, 0.408329516649246, 0.319939345121384, 0.279028236865997, 0.222155645489693, 0.179503843188286, 0.17168553173542, 0.136883869767189, 0.11984758079052]</td>\n",
- " <td>0.833100020885</td>\n",
- " <td>0.599731981754</td>\n",
- " <td>[0.741900026798248, 0.784900009632111, 0.796500027179718, 0.814000010490417, 0.820100009441376, 0.828100025653839, 0.83160001039505, 0.831499993801117, 0.834399998188019, 0.833100020885468]</td>\n",
- " <td>[0.74375057220459, 0.641318619251251, 0.627871870994568, 0.585915207862854, 0.588144600391388, 0.569212675094604, 0.577586710453033, 0.590799033641815, 0.581186473369598, 0.599731981754303]</td>\n",
+ " <td>0.942120015621</td>\n",
+ " <td>0.166348025203</td>\n",
+ " <td>[0.768679976463318, 0.83459997177124, 0.865559995174408, 0.88782000541687, 0.900080025196075, 0.898840010166168, 0.929400026798248, 0.926339983940125, 0.941559970378876, 0.942120015621185]</td>\n",
+ " <td>[0.659707903862, 0.479000419378281, 0.394761860370636, 0.320042163133621, 0.286971271038055, 0.289592266082764, 0.203219100832939, 0.216255784034729, 0.16890250146389, 0.166348025202751]</td>\n",
+ " <td>0.834399998188</td>\n",
+ " <td>0.587312161922</td>\n",
+ " <td>[0.751600027084351, 0.794099986553192, 0.81029999256134, 0.816500008106232, 0.825600028038025, 0.819199979305267, 0.825200021266937, 0.833199977874756, 0.840300023555756, 0.834399998188019]</td>\n",
+ " <td>[0.725527286529541, 0.628955543041229, 0.603530406951904, 0.578122794628143, 0.565659284591675, 0.587804615497589, 0.575832903385162, 0.586635053157806, 0.558215022087097, 0.587312161922455]</td>\n",
" </tr>\n",
" <tr>\n",
- " <td>13</td>\n",
+ " <td>15</td>\n",
" <td>2</td>\n",
- " <td>loss='categorical_crossentropy',optimizer='rmsprop(lr=0.001, decay=1e-6)',metrics=['accuracy']</td>\n",
+ " <td>loss='categorical_crossentropy',optimizer='adam(lr=0.001)',metrics=['accuracy']</td>\n",
" <td>batch_size=64,epochs=5</td>\n",
" <td>madlib_keras</td>\n",
" <td>2159.70019531</td>\n",
- " <td>[165.07025885582, 331.04939699173, 498.211872816086, 667.060778856277, 836.708249807358, 1007.20118093491, 1176.76868081093, 1348.24542784691, 1520.97673892975, 1695.76891899109]</td>\n",
+ " <td>[159.585074901581, 325.616278886795, 492.079638957977, 660.141077041626, 828.460551977158, 997.682931900024, 1168.2648499012, 1338.03905391693, 1509.35755109787, 1680.94471693039]</td>\n",
" <td>[u'accuracy']</td>\n",
- " <td>0.94892001152</td>\n",
- " <td>0.146594136953</td>\n",
- " <td>[0.786400020122528, 0.839680016040802, 0.869140028953552, 0.878480017185211, 0.909940004348755, 0.913100004196167, 0.934099972248077, 0.94021999835968, 0.936819970607758, 0.948920011520386]</td>\n",
- " <td>[0.625118017196655, 0.466760665178299, 0.38435173034668, 0.353523939847946, 0.260264813899994, 0.252679228782654, 0.190901413559914, 0.176555588841438, 0.181787580251694, 0.146594136953354]</td>\n",
- " <td>0.82959997654</td>\n",
- " <td>0.581429600716</td>\n",
- " <td>[0.76120001077652, 0.787599980831146, 0.804199993610382, 0.805400013923645, 0.815400004386902, 0.824199974536896, 0.827499985694885, 0.826099991798401, 0.822399973869324, 0.829599976539612]</td>\n",
- " <td>[0.711538255214691, 0.647833049297333, 0.601243674755096, 0.620489895343781, 0.593936264514923, 0.592362821102142, 0.572449862957001, 0.586679399013519, 0.630510628223419, 0.581429600715637]</td>\n",
+ " <td>0.957620024681</td>\n",
+ " <td>0.123506456614</td>\n",
+ " <td>[0.780160009860992, 0.830079972743988, 0.864920020103455, 0.880159974098206, 0.907660007476807, 0.922760009765625, 0.930760025978088, 0.94489997625351, 0.953960001468658, 0.957620024681091]</td>\n",
+ " <td>[0.640457689762115, 0.484953910112381, 0.392606198787689, 0.350569307804108, 0.266773730516434, 0.223709508776665, 0.199900239706039, 0.160074487328529, 0.134055703878403, 0.123506456613541]</td>\n",
+ " <td>0.833199977875</td>\n",
+ " <td>0.585961103439</td>\n",
+ " <td>[0.747500002384186, 0.790600001811981, 0.805899977684021, 0.807099997997284, 0.818899989128113, 0.814999997615814, 0.821300029754639, 0.827600002288818, 0.830999970436096, 0.833199977874756]</td>\n",
+ " <td>[0.733774244785309, 0.621092319488525, 0.600942432880402, 0.603525757789612, 0.582037806510925, 0.593123733997345, 0.593485474586487, 0.585796058177948, 0.578036189079285, 0.585961103439331]</td>\n",
" </tr>\n",
" <tr>\n",
- " <td>14</td>\n",
+ " <td>13</td>\n",
" <td>2</td>\n",
" <td>loss='categorical_crossentropy',optimizer='rmsprop(lr=0.001, decay=1e-6)',metrics=['accuracy']</td>\n",
- " <td>batch_size=128,epochs=5</td>\n",
+ " <td>batch_size=64,epochs=5</td>\n",
" <td>madlib_keras</td>\n",
" <td>2159.70019531</td>\n",
- " <td>[161.95653796196, 327.381590843201, 494.75689291954, 663.697657823563, 833.140888929367, 1003.58734488487, 1173.66367697716, 1344.3388338089, 1517.75524687767, 1691.74780988693]</td>\n",
+ " <td>[164.595175027847, 330.364078044891, 497.435774087906, 665.216387033463, 833.770098924637, 1002.83351397514, 1173.14754009247, 1343.40405297279, 1514.43769907951, 1686.70381498337]</td>\n",
" <td>[u'accuracy']</td>\n",
- " <td>0.942839980125</td>\n",
- " <td>0.167295366526</td>\n",
- " <td>[0.770560026168823, 0.822459995746613, 0.871060013771057, 0.886059999465942, 0.906120002269745, 0.91347998380661, 0.916339993476868, 0.929560005664825, 0.938979983329773, 0.942839980125427]</td>\n",
- " <td>[0.656668424606323, 0.515599489212036, 0.367846250534058, 0.332457065582275, 0.276119023561478, 0.253687649965286, 0.2399021089077, 0.203119158744812, 0.174109742045403, 0.16729536652565]</td>\n",
- " <td>0.827600002289</td>\n",
- " <td>0.60536968708</td>\n",
- " <td>[0.734799981117249, 0.784600019454956, 0.806299984455109, 0.811600029468536, 0.817499995231628, 0.823800027370453, 0.828299999237061, 0.829900026321411, 0.828999996185303, 0.827600002288818]</td>\n",
- " <td>[0.777421414852142, 0.645794928073883, 0.587472915649414, 0.603748321533203, 0.590349853038788, 0.586721003055573, 0.58501935005188, 0.603322744369507, 0.596234917640686, 0.605369687080383]</td>\n",
+ " <td>0.950980007648</td>\n",
+ " <td>0.143490716815</td>\n",
+ " <td>[0.78983998298645, 0.840439975261688, 0.875959992408752, 0.891099989414215, 0.90090000629425, 0.919920027256012, 0.934400022029877, 0.938539981842041, 0.955479979515076, 0.950980007648468]</td>\n",
+ " <td>[0.613083124160767, 0.471387982368469, 0.363269150257111, 0.319806933403015, 0.286749541759491, 0.234226956963539, 0.19084843993187, 0.177600309252739, 0.131557434797287, 0.143490716814995]</td>\n",
+ " <td>0.821799993515</td>\n",
+ " <td>0.595590293407</td>\n",
+ " <td>[0.754000008106232, 0.79229998588562, 0.801699995994568, 0.812300026416779, 0.819000005722046, 0.819000005722046, 0.823300004005432, 0.829999983310699, 0.836300015449524, 0.821799993515015]</td>\n",
+ " <td>[0.721113681793213, 0.621586740016937, 0.596519410610199, 0.595609545707703, 0.600475549697876, 0.613331437110901, 0.595634639263153, 0.574845016002655, 0.569734573364258, 0.59559029340744]</td>\n",
" </tr>\n",
" <tr>\n",
- " <td>11</td>\n",
+ " <td>9</td>\n",
" <td>2</td>\n",
- " <td>loss='categorical_crossentropy',optimizer='rmsprop(lr=0.0001, decay=1e-6)',metrics=['accuracy']</td>\n",
+ " <td>loss='categorical_crossentropy',optimizer='adam(lr=0.0001)',metrics=['accuracy']</td>\n",
" <td>batch_size=64,epochs=5</td>\n",
" <td>madlib_keras</td>\n",
" <td>2159.70019531</td>\n",
- " <td>[173.035629987717, 339.004810810089, 506.329674959183, 675.320897817612, 845.306622982025, 1015.91489100456, 1185.85607385635, 1357.71336293221, 1530.14687585831, 1705.61137890816]</td>\n",
+ " <td>[155.881345033646, 321.711883068085, 488.33388209343, 656.33606004715, 824.596586942673, 993.720223903656, 1164.30447506905, 1334.05466103554, 1505.45432305336, 1677.10981488228]</td>\n",
" <td>[u'accuracy']</td>\n",
- " <td>0.892719984055</td>\n",
- " <td>0.309859842062</td>\n",
- " <td>[0.583959996700287, 0.695259988307953, 0.754980027675629, 0.787720024585724, 0.814040005207062, 0.835359990596771, 0.856899976730347, 0.871460020542145, 0.884779989719391, 0.892719984054565]</td>\n",
- " <td>[1.16789627075195, 0.861167967319489, 0.705251038074493, 0.607605278491974, 0.531997323036194, 0.470408618450165, 0.413226217031479, 0.370105147361755, 0.334705889225006, 0.309859842061996]</td>\n",
- " <td>0.813000023365</td>\n",
- " <td>0.566866695881</td>\n",
- " <td>[0.579999983310699, 0.690999984741211, 0.738099992275238, 0.763599991798401, 0.773800015449524, 0.783800005912781, 0.798500001430511, 0.802699983119965, 0.80620002746582, 0.813000023365021]</td>\n",
- " <td>[1.17161071300507, 0.881313383579254, 0.754627048969269, 0.680095791816711, 0.643820106983185, 0.620280385017395, 0.590712904930115, 0.576853334903717, 0.574894845485687, 0.56686669588089]</td>\n",
+ " <td>0.897319972515</td>\n",
+ " <td>0.302623033524</td>\n",
+ " <td>[0.585739970207214, 0.694540023803711, 0.738439977169037, 0.788339972496033, 0.815580010414124, 0.834140002727509, 0.851960003376007, 0.870700001716614, 0.883599996566772, 0.897319972515106]</td>\n",
+ " <td>[1.1557844877243, 0.861163735389709, 0.741564929485321, 0.606875598430634, 0.530352532863617, 0.474545627832413, 0.425946325063705, 0.374209344387054, 0.336798161268234, 0.30262303352356]</td>\n",
+ " <td>0.815199971199</td>\n",
+ " <td>0.553332149982</td>\n",
+ " <td>[0.588599979877472, 0.692600011825562, 0.732900023460388, 0.767099976539612, 0.781899988651276, 0.791299998760223, 0.802100002765656, 0.805999994277954, 0.810199975967407, 0.815199971199036]</td>\n",
+ " <td>[1.1479709148407, 0.871322154998779, 0.77245706319809, 0.673963844776154, 0.631623148918152, 0.608054459095001, 0.585181176662445, 0.569720149040222, 0.558107197284698, 0.553332149982452]</td>\n",
" </tr>\n",
" <tr>\n",
- " <td>9</td>\n",
+ " <td>11</td>\n",
" <td>2</td>\n",
- " <td>loss='categorical_crossentropy',optimizer='adam(lr=0.0001)',metrics=['accuracy']</td>\n",
+ " <td>loss='categorical_crossentropy',optimizer='rmsprop(lr=0.0001, decay=1e-6)',metrics=['accuracy']</td>\n",
" <td>batch_size=64,epochs=5</td>\n",
" <td>madlib_keras</td>\n",
" <td>2159.70019531</td>\n",
- " <td>[156.6842648983, 322.059647798538, 489.514621019363, 658.153139829636, 827.505573987961, 997.966463804245, 1168.05154681206, 1338.58688092232, 1511.8177728653, 1685.66397881508]</td>\n",
+ " <td>[172.771174907684, 338.155246973038, 505.790575027466, 673.744323015213, 842.298762083054, 1011.25688695908, 1182.03339600563, 1352.39258003235, 1523.84475708008, 1696.31324291229]</td>\n",
" <td>[u'accuracy']</td>\n",
- " <td>0.89484000206</td>\n",
- " <td>0.305973917246</td>\n",
- " <td>[0.607659995555878, 0.689279973506927, 0.748199999332428, 0.779420018196106, 0.812300026416779, 0.830940008163452, 0.854920029640198, 0.868260025978088, 0.885720014572144, 0.894840002059937]</td>\n",
- " <td>[1.11698472499847, 0.874710261821747, 0.711394190788269, 0.626727402210236, 0.533221900463104, 0.478961884975433, 0.414784848690033, 0.376370459794998, 0.330575972795486, 0.305973917245865]</td>\n",
- " <td>0.81099998951</td>\n",
- " <td>0.550887346268</td>\n",
- " <td>[0.602699995040894, 0.681299984455109, 0.728600025177002, 0.754400014877319, 0.774600028991699, 0.784300029277802, 0.795799970626831, 0.80129998922348, 0.807399988174438, 0.810999989509583]</td>\n",
- " <td>[1.11438655853271, 0.900401651859283, 0.765824854373932, 0.704216003417969, 0.643769145011902, 0.616570711135864, 0.586219370365143, 0.571570515632629, 0.558478593826294, 0.5508873462677]</td>\n",
+ " <td>0.889580011368</td>\n",
+ " <td>0.317797064781</td>\n",
+ " <td>[0.610719978809357, 0.702679991722107, 0.758080005645752, 0.787779986858368, 0.820479989051819, 0.840399980545044, 0.858399987220764, 0.869899988174438, 0.879320025444031, 0.889580011367798]</td>\n",
+ " <td>[1.1027592420578, 0.840861320495605, 0.687958598136902, 0.603124439716339, 0.51472145318985, 0.460182726383209, 0.407543867826462, 0.375441372394562, 0.346606284379959, 0.317797064781189]</td>\n",
+ " <td>0.812399983406</td>\n",
+ " <td>0.564498662949</td>\n",
+ " <td>[0.608399987220764, 0.697700023651123, 0.739300012588501, 0.758899986743927, 0.782599985599518, 0.793600022792816, 0.799199998378754, 0.806599974632263, 0.810599982738495, 0.812399983406067]</td>\n",
+ " <td>[1.10815918445587, 0.86056125164032, 0.739441454410553, 0.684951841831207, 0.629340946674347, 0.604862153530121, 0.582197725772858, 0.574008762836456, 0.559266090393066, 0.564498662948608]</td>\n",
" </tr>\n",
" <tr>\n",
" <td>10</td>\n",
@@ -2354,16 +2327,16 @@
" <td>batch_size=128,epochs=5</td>\n",
" <td>madlib_keras</td>\n",
" <td>2159.70019531</td>\n",
- " <td>[158.506701946259, 323.779083013535, 491.302199840546, 660.148201942444, 829.340363025665, 999.844955921173, 1169.83032798767, 1340.5411260128, 1513.8498609066, 1687.69545793533]</td>\n",
+ " <td>[157.675038099289, 323.760583877563, 489.999938964844, 658.165150880814, 826.338515996933, 995.962205886841, 1166.19140601158, 1335.88773202896, 1507.49120998383, 1679.03732204437]</td>\n",
" <td>[u'accuracy']</td>\n",
- " <td>0.867579996586</td>\n",
- " <td>0.380911707878</td>\n",
- " <td>[0.576640009880066, 0.66431999206543, 0.707199990749359, 0.749520003795624, 0.778980016708374, 0.799520015716553, 0.820659995079041, 0.839940011501312, 0.854659974575043, 0.867579996585846]</td>\n",
- " <td>[1.20035827159882, 0.945839285850525, 0.823047578334808, 0.703792750835419, 0.624295234680176, 0.566677749156952, 0.511338114738464, 0.459649682044983, 0.418204575777054, 0.380911707878113]</td>\n",
- " <td>0.799700021744</td>\n",
- " <td>0.571797966957</td>\n",
- " <td>[0.572700023651123, 0.655099987983704, 0.69980001449585, 0.731299996376038, 0.756399989128113, 0.771399974822998, 0.778999984264374, 0.791599988937378, 0.798200011253357, 0.799700021743774]</td>\n",
- " <td>[1.20565474033356, 0.964107036590576, 0.849484860897064, 0.752416431903839, 0.691979646682739, 0.65268349647522, 0.628291726112366, 0.599337160587311, 0.586054861545563, 0.571797966957092]</td>\n",
+ " <td>0.865880012512</td>\n",
+ " <td>0.386452704668</td>\n",
+ " <td>[0.554459989070892, 0.660399973392487, 0.71670001745224, 0.754540026187897, 0.78276002407074, 0.806519985198975, 0.81879997253418, 0.83898001909256, 0.850740015506744, 0.865880012512207]</td>\n",
+ " <td>[1.26610136032104, 0.961102485656738, 0.805769920349121, 0.702959299087524, 0.625120878219604, 0.556592226028442, 0.513025283813477, 0.460623860359192, 0.426946371793747, 0.386452704668045]</td>\n",
+ " <td>0.806100010872</td>\n",
+ " <td>0.569638252258</td>\n",
+ " <td>[0.552999973297119, 0.657100021839142, 0.711000025272369, 0.737600028514862, 0.758300006389618, 0.77700001001358, 0.783100008964539, 0.794099986553192, 0.801199972629547, 0.806100010871887]</td>\n",
+ " <td>[1.26569390296936, 0.972574234008789, 0.835387766361237, 0.750236749649048, 0.694831550121307, 0.648999333381653, 0.622370600700378, 0.599871814250946, 0.581832528114319, 0.569638252258301]</td>\n",
" </tr>\n",
" <tr>\n",
" <td>12</td>\n",
@@ -2372,16 +2345,16 @@
" <td>batch_size=128,epochs=5</td>\n",
" <td>madlib_keras</td>\n",
" <td>2159.70019531</td>\n",
- " <td>[170.873965024948, 337.211632966995, 504.536657810211, 673.510901927948, 843.392476797104, 1014.04761791229, 1183.94673490524, 1355.76256680489, 1528.15198993683, 1703.5478978157]</td>\n",
+ " <td>[171.145457983017, 336.337003946304, 504.029928922653, 671.705837965012, 840.568361997604, 1009.40254306793, 1179.99340295792, 1350.53466200829, 1521.91818499565, 1694.26437997818]</td>\n",
" <td>[u'accuracy']</td>\n",
- " <td>0.856419980526</td>\n",
- " <td>0.410014539957</td>\n",
- " <td>[0.547559976577759, 0.647800028324127, 0.698180019855499, 0.746360003948212, 0.769439995288849, 0.794420003890991, 0.814459979534149, 0.829039990901947, 0.850260019302368, 0.85641998052597]</td>\n",
- " <td>[1.27583348751068, 1.00206804275513, 0.853795170783997, 0.720450162887573, 0.650525093078613, 0.582838296890259, 0.527670443058014, 0.484861791133881, 0.428409487009048, 0.410014539957047]</td>\n",
- " <td>0.798799991608</td>\n",
- " <td>0.597697675228</td>\n",
- " <td>[0.546700000762939, 0.638999998569489, 0.690900027751923, 0.731299996376038, 0.745500028133392, 0.763100028038025, 0.776300013065338, 0.78549998998642, 0.795000016689301, 0.798799991607666]</td>\n",
- " <td>[1.27788388729095, 1.02294909954071, 0.881045579910278, 0.773496091365814, 0.725675582885742, 0.681352615356445, 0.649362862110138, 0.62593412399292, 0.598857045173645, 0.597697675228119]</td>\n",
+ " <td>0.868319988251</td>\n",
+ " <td>0.377308398485</td>\n",
+ " <td>[0.549000024795532, 0.662000000476837, 0.71262001991272, 0.75543999671936, 0.783819973468781, 0.801800012588501, 0.819119989871979, 0.837419986724854, 0.854939997196198, 0.868319988250732]</td>\n",
+ " <td>[1.28990209102631, 0.96648907661438, 0.814616560935974, 0.696749150753021, 0.613618135452271, 0.56260073184967, 0.512484431266785, 0.460049092769623, 0.412180662155151, 0.377308398485184]</td>\n",
+ " <td>0.803799986839</td>\n",
+ " <td>0.570892989635</td>\n",
+ " <td>[0.548399984836578, 0.653999984264374, 0.700100004673004, 0.735899984836578, 0.758899986743927, 0.765999972820282, 0.779900014400482, 0.790300011634827, 0.803600013256073, 0.803799986839294]</td>\n",
+ " <td>[1.28837704658508, 0.981181442737579, 0.849580764770508, 0.754298150539398, 0.693142831325531, 0.669469833374023, 0.640279293060303, 0.606397569179535, 0.579119145870209, 0.570892989635468]</td>\n",
" </tr>\n",
" <tr>\n",
" <td>8</td>\n",
@@ -2390,34 +2363,34 @@
" <td>batch_size=128,epochs=5</td>\n",
" <td>madlib_keras</td>\n",
" <td>4886.20019531</td>\n",
- " <td>[165.667771816254, 331.63804101944, 498.80203294754, 667.662895917892, 837.58491396904, 1007.91998696327, 1177.68679785728, 1348.86184287071, 1521.96094989777, 1696.78608179092]</td>\n",
+ " <td>[165.13839507103, 330.998286962509, 498.064635038376, 665.857858896255, 834.544732093811, 1003.45657801628, 1173.99867010117, 1344.03136301041, 1515.32256889343, 1687.61437892914]</td>\n",
" <td>[u'accuracy']</td>\n",
- " <td>0.909500002861</td>\n",
- " <td>0.272008836269</td>\n",
- " <td>[0.752040028572083, 0.828859984874725, 0.851639986038208, 0.888540029525757, 0.888599991798401, 0.894879996776581, 0.903320014476776, 0.910380005836487, 0.879000008106232, 0.909500002861023]</td>\n",
- " <td>[0.712807893753052, 0.499261021614075, 0.437727391719818, 0.330645024776459, 0.325151771306992, 0.308288186788559, 0.296011507511139, 0.272213906049728, 0.394761264324188, 0.272008836269379]</td>\n",
- " <td>0.779699981213</td>\n",
- " <td>0.834259152412</td>\n",
- " <td>[0.708500027656555, 0.751299977302551, 0.765500009059906, 0.772300004959106, 0.777100026607513, 0.783599972724915, 0.777999997138977, 0.784099996089935, 0.769800007343292, 0.779699981212616]</td>\n",
- " <td>[0.841326177120209, 0.729629755020142, 0.776288628578186, 0.718003392219543, 0.76948493719101, 0.767067849636078, 0.827211439609528, 0.747310042381287, 0.895535230636597, 0.834259152412415]</td>\n",
+ " <td>0.901880025864</td>\n",
+ " <td>0.298958897591</td>\n",
+ " <td>[0.73361998796463, 0.803380012512207, 0.845399975776672, 0.863979995250702, 0.876219987869263, 0.889880001544952, 0.894959986209869, 0.898679971694946, 0.908540010452271, 0.901880025863647]</td>\n",
+ " <td>[0.760902941226959, 0.566388249397278, 0.448656052350998, 0.407294452190399, 0.36840745806694, 0.333151549100876, 0.314622759819031, 0.304351091384888, 0.28503081202507, 0.298958897590637]</td>\n",
+ " <td>0.782000005245</td>\n",
+ " <td>0.749579071999</td>\n",
+ " <td>[0.707300007343292, 0.752300024032593, 0.762000024318695, 0.773599982261658, 0.780399978160858, 0.786300003528595, 0.784300029277802, 0.784099996089935, 0.788299977779388, 0.782000005245209]</td>\n",
+ " <td>[0.836693525314331, 0.743824541568756, 0.733612596988678, 0.737680375576019, 0.760832130908966, 0.723663866519928, 0.78948837518692, 0.804735660552979, 0.70469468832016, 0.749579071998596]</td>\n",
" </tr>\n",
" <tr>\n",
+ " <td>3</td>\n",
" <td>1</td>\n",
- " <td>1</td>\n",
- " <td>loss='categorical_crossentropy',optimizer='adam(lr=0.0001)',metrics=['accuracy']</td>\n",
+ " <td>loss='categorical_crossentropy',optimizer='rmsprop(lr=0.0001, decay=1e-6)',metrics=['accuracy']</td>\n",
" <td>batch_size=64,epochs=5</td>\n",
" <td>madlib_keras</td>\n",
" <td>4886.20019531</td>\n",
- " <td>[168.611300945282, 334.899528980255, 502.037551879883, 671.096584796906, 840.693498849869, 1011.29117488861, 1181.11248087883, 1352.68110394478, 1525.13323402405, 1700.88493180275]</td>\n",
+ " <td>[153.837145090103, 319.967153072357, 486.56719994545, 654.53327703476, 822.778059959412, 991.797204971313, 1162.18237304688, 1331.98686599731, 1503.55213904381, 1675.16517400742]</td>\n",
" <td>[u'accuracy']</td>\n",
- " <td>0.920239984989</td>\n",
- " <td>0.272924244404</td>\n",
- " <td>[0.584800004959106, 0.682219982147217, 0.732940018177032, 0.774779975414276, 0.806119978427887, 0.837840020656586, 0.862119972705841, 0.883340001106262, 0.90311998128891, 0.920239984989166]</td>\n",
- " <td>[1.17424917221069, 0.919099688529968, 0.776308834552765, 0.661072790622711, 0.573073744773865, 0.487901866436005, 0.420156627893448, 0.368478238582611, 0.319370418787003, 0.272924244403839]</td>\n",
- " <td>0.775600016117</td>\n",
- " <td>0.679777920246</td>\n",
- " <td>[0.576799988746643, 0.657599985599518, 0.694700002670288, 0.721199989318848, 0.741400003433228, 0.750500023365021, 0.758800029754639, 0.764599978923798, 0.771899998188019, 0.775600016117096]</td>\n",
- " <td>[1.19727396965027, 0.98458856344223, 0.873661160469055, 0.809533834457397, 0.764622151851654, 0.735906422138214, 0.700538396835327, 0.705035388469696, 0.696578562259674, 0.679777920246124]</td>\n",
+ " <td>0.830699980259</td>\n",
+ " <td>0.507873356342</td>\n",
+ " <td>[0.575259983539581, 0.66838002204895, 0.703379988670349, 0.743640005588531, 0.776799976825714, 0.796980023384094, 0.801840007305145, 0.814220011234283, 0.8264200091362, 0.830699980258942]</td>\n",
+ " <td>[1.19788825511932, 0.950228035449982, 0.852661311626434, 0.741594791412354, 0.646690189838409, 0.594518661499023, 0.582961976528168, 0.546181917190552, 0.528378546237946, 0.507873356342316]</td>\n",
+ " <td>0.768700003624</td>\n",
+ " <td>0.684073984623</td>\n",
+ " <td>[0.57039999961853, 0.656899988651276, 0.682200014591217, 0.707400023937225, 0.735099971294403, 0.744599997997284, 0.745100021362305, 0.754899978637695, 0.758899986743927, 0.768700003623962]</td>\n",
+ " <td>[1.20627999305725, 0.984861135482788, 0.915386915206909, 0.849376976490021, 0.766118228435516, 0.73919004201889, 0.750212430953979, 0.715151488780975, 0.710894227027893, 0.684073984622955]</td>\n",
" </tr>\n",
" <tr>\n",
" <td>7</td>\n",
@@ -2426,34 +2399,34 @@
" <td>batch_size=64,epochs=5</td>\n",
" <td>madlib_keras</td>\n",
" <td>4886.20019531</td>\n",
- " <td>[154.371929883957, 319.090498924255, 486.952117919922, 655.78808093071, 824.799381971359, 995.210795879364, 1165.24253582954, 1336.07785487175, 1508.86772489548, 1682.56205582619]</td>\n",
+ " <td>[153.238389015198, 319.147723913193, 485.898155927658, 653.912374973297, 821.91964006424, 990.972142934799, 1161.34698009491, 1331.33741092682, 1502.62626290321, 1674.06854605675]</td>\n",
" <td>[u'accuracy']</td>\n",
- " <td>0.861419975758</td>\n",
- " <td>0.432331353426</td>\n",
- " <td>[0.766240000724792, 0.827859997749329, 0.855539977550507, 0.868900001049042, 0.871540009975433, 0.88238000869751, 0.873179972171783, 0.878740012645721, 0.873459994792938, 0.861419975757599]</td>\n",
- " <td>[0.682850182056427, 0.503075182437897, 0.426931649446487, 0.385531783103943, 0.383735597133636, 0.371502071619034, 0.389450550079346, 0.369848489761353, 0.391900181770325, 0.43233135342598]</td>\n",
- " <td>0.767599999905</td>\n",
- " <td>0.752326309681</td>\n",
- " <td>[0.719299972057343, 0.751500010490417, 0.765399992465973, 0.769999980926514, 0.772499978542328, 0.776799976825714, 0.770099997520447, 0.77649998664856, 0.76800000667572, 0.767599999904633]</td>\n",
- " <td>[0.819014072418213, 0.739358127117157, 0.74931389093399, 0.773028433322906, 0.763317465782166, 0.729169189929962, 0.805014729499817, 0.808122754096985, 0.812756359577179, 0.752326309680939]</td>\n",
+ " <td>0.856920003891</td>\n",
+ " <td>0.451146841049</td>\n",
+ " <td>[0.761780023574829, 0.809880018234253, 0.847639977931976, 0.856180012226105, 0.873279988765717, 0.855459988117218, 0.864660024642944, 0.858539998531342, 0.870779991149902, 0.856920003890991]</td>\n",
+ " <td>[0.700620949268341, 0.555083990097046, 0.447981059551239, 0.41928830742836, 0.381862819194794, 0.444543987512589, 0.415986865758896, 0.422646254301071, 0.402874350547791, 0.451146841049194]</td>\n",
+ " <td>0.768199980259</td>\n",
+ " <td>0.752578496933</td>\n",
+ " <td>[0.71780002117157, 0.746599972248077, 0.770099997520447, 0.769400000572205, 0.775499999523163, 0.763999998569489, 0.77319997549057, 0.769599974155426, 0.773899972438812, 0.768199980258942]</td>\n",
+ " <td>[0.833690404891968, 0.785688281059265, 0.77972024679184, 0.768506526947021, 0.768417119979858, 0.789122343063354, 0.87133800983429, 0.791547298431396, 0.893152952194214, 0.752578496932983]</td>\n",
" </tr>\n",
" <tr>\n",
- " <td>3</td>\n",
" <td>1</td>\n",
- " <td>loss='categorical_crossentropy',optimizer='rmsprop(lr=0.0001, decay=1e-6)',metrics=['accuracy']</td>\n",
+ " <td>1</td>\n",
+ " <td>loss='categorical_crossentropy',optimizer='adam(lr=0.0001)',metrics=['accuracy']</td>\n",
" <td>batch_size=64,epochs=5</td>\n",
" <td>madlib_keras</td>\n",
" <td>4886.20019531</td>\n",
- " <td>[154.969959974289, 319.906549930573, 487.758535861969, 656.377619981766, 825.622062921524, 996.102727890015, 1166.17477893829, 1336.67210102081, 1509.83961796761, 1683.64339399338]</td>\n",
+ " <td>[168.396234035492, 334.120693922043, 501.40336894989, 669.109417915344, 837.907988071442, 1006.88363099098, 1177.267567873, 1347.72842693329, 1518.65019989014, 1691.63165593147]</td>\n",
" <td>[u'accuracy']</td>\n",
- " <td>0.821099996567</td>\n",
- " <td>0.525239348412</td>\n",
- " <td>[0.561699986457825, 0.668940007686615, 0.717679977416992, 0.75297999382019, 0.767099976539612, 0.795260012149811, 0.807739973068237, 0.811280012130737, 0.826099991798401, 0.821099996566772]</td>\n",
- " <td>[1.220210313797, 0.947799980640411, 0.812605798244476, 0.718978762626648, 0.679905712604523, 0.613099038600922, 0.566433131694794, 0.552485108375549, 0.512454450130463, 0.52523934841156]</td>\n",
- " <td>0.758599996567</td>\n",
- " <td>0.737899065018</td>\n",
- " <td>[0.559899985790253, 0.647000014781952, 0.683300018310547, 0.709100008010864, 0.723800003528595, 0.742299973964691, 0.749700009822845, 0.757099986076355, 0.765600025653839, 0.758599996566772]</td>\n",
- " <td>[1.22284317016602, 0.988233506679535, 0.88149094581604, 0.825053095817566, 0.811959385871887, 0.752561450004578, 0.741220593452454, 0.739940404891968, 0.711078464984894, 0.7378990650177]</td>\n",
+ " <td>0.902440011501</td>\n",
+ " <td>0.307300060987</td>\n",
+ " <td>[0.571120023727417, 0.666620016098022, 0.719539999961853, 0.757499992847443, 0.801400005817413, 0.826300024986267, 0.855199992656708, 0.875140011310577, 0.896160006523132, 0.902440011501312]</td>\n",
+ " <td>[1.22345066070557, 0.955978691577911, 0.811635494232178, 0.699091494083405, 0.582630336284637, 0.513621211051941, 0.437977999448776, 0.38476750254631, 0.333268582820892, 0.307300060987473]</td>\n",
+ " <td>0.767599999905</td>\n",
+ " <td>0.70242357254</td>\n",
+ " <td>[0.563700020313263, 0.645600020885468, 0.688799977302551, 0.71450001001358, 0.735000014305115, 0.746500015258789, 0.758599996566772, 0.757600009441376, 0.764500021934509, 0.767599999904633]</td>\n",
+ " <td>[1.24051570892334, 1.01462411880493, 0.90478104352951, 0.8267902135849, 0.766438901424408, 0.734673857688904, 0.706092000007629, 0.708917021751404, 0.692819654941559, 0.702423572540283]</td>\n",
" </tr>\n",
" <tr>\n",
" <td>2</td>\n",
@@ -2462,16 +2435,16 @@
" <td>batch_size=128,epochs=5</td>\n",
" <td>madlib_keras</td>\n",
" <td>4886.20019531</td>\n",
- " <td>[169.201556921005, 335.50149679184, 502.804733991623, 671.735637903214, 841.536010980606, 1012.17449593544, 1182.0387070179, 1353.62765884399, 1526.14807486534, 1701.52705287933]</td>\n",
+ " <td>[169.02210688591, 334.716751098633, 502.072870016098, 669.68922495842, 838.805229902267, 1007.46399402618, 1178.16211009026, 1348.57077288628, 1519.57116508484, 1692.27466797829]</td>\n",
" <td>[u'accuracy']</td>\n",
- " <td>0.866079986095</td>\n",
- " <td>0.411734908819</td>\n",
- " <td>[0.535120010375977, 0.633019983768463, 0.683080017566681, 0.727400004863739, 0.757719993591309, 0.788060009479523, 0.812640011310577, 0.835120022296906, 0.846180021762848, 0.866079986095428]</td>\n",
- " <td>[1.29918956756592, 1.05417799949646, 0.917978286743164, 0.795661866664886, 0.70832484960556, 0.632884621620178, 0.562899112701416, 0.502775311470032, 0.463661164045334, 0.411734908819199]</td>\n",
- " <td>0.758199989796</td>\n",
- " <td>0.725014865398</td>\n",
- " <td>[0.527800023555756, 0.620299994945526, 0.656300008296967, 0.690400004386902, 0.707400023937225, 0.726199984550476, 0.734799981117249, 0.746500015258789, 0.750999987125397, 0.758199989795685]</td>\n",
- " <td>[1.31133198738098, 1.09069919586182, 0.985389471054077, 0.897808969020844, 0.84535801410675, 0.804515540599823, 0.770778298377991, 0.748202204704285, 0.736022055149078, 0.725014865398407]</td>\n",
+ " <td>0.859300017357</td>\n",
+ " <td>0.428565859795</td>\n",
+ " <td>[0.532220005989075, 0.620400011539459, 0.674700021743774, 0.71340000629425, 0.747839987277985, 0.780160009860992, 0.801919996738434, 0.826839983463287, 0.849420011043549, 0.859300017356873]</td>\n",
+ " <td>[1.31418240070343, 1.07741296291351, 0.936273753643036, 0.825335919857025, 0.737494826316833, 0.649210572242737, 0.589954197406769, 0.524990677833557, 0.465339541435242, 0.428565859794617]</td>\n",
+ " <td>0.756900012493</td>\n",
+ " <td>0.719096183777</td>\n",
+ " <td>[0.529799997806549, 0.603900015354156, 0.656199991703033, 0.683700025081635, 0.703100025653839, 0.719600021839142, 0.730199992656708, 0.741400003433228, 0.747500002384186, 0.756900012493134]</td>\n",
+ " <td>[1.31718754768372, 1.11032629013062, 0.995527803897858, 0.911838352680206, 0.854842782020569, 0.803986191749573, 0.772469937801361, 0.748935461044312, 0.730905950069427, 0.719096183776855]</td>\n",
" </tr>\n",
" <tr>\n",
" <td>4</td>\n",
@@ -2480,16 +2453,16 @@
" <td>batch_size=128,epochs=5</td>\n",
" <td>madlib_keras</td>\n",
" <td>4886.20019531</td>\n",
- " <td>[163.359121799469, 328.837852954865, 496.364542961121, 665.302300930023, 834.891145944595, 1005.38074088097, 1174.84563589096, 1345.91664791107, 1518.93280696869, 1693.73289394379]</td>\n",
+ " <td>[162.9407351017, 328.580847024918, 495.239603042603, 663.518301010132, 831.940176010132, 1001.0917840004, 1171.16344308853, 1341.38065099716, 1512.53006696701, 1684.75480604172]</td>\n",
" <td>[u'accuracy']</td>\n",
- " <td>0.82415997982</td>\n",
- " <td>0.518441617489</td>\n",
- " <td>[0.521520018577576, 0.612500011920929, 0.638840019702911, 0.686819970607758, 0.740119993686676, 0.765739977359772, 0.78847998380661, 0.814140021800995, 0.825020015239716, 0.824159979820251]</td>\n",
- " <td>[1.33973300457001, 1.10515522956848, 1.02763831615448, 0.890439391136169, 0.749050080776215, 0.679889440536499, 0.620155572891235, 0.560859560966492, 0.520996809005737, 0.518441617488861]</td>\n",
- " <td>0.757799983025</td>\n",
- " <td>0.732741773129</td>\n",
- " <td>[0.515500009059906, 0.602699995040894, 0.630599975585938, 0.66619998216629, 0.70959997177124, 0.721300005912781, 0.73470002412796, 0.751500010490417, 0.756099998950958, 0.757799983024597]</td>\n",
- " <td>[1.34494018554688, 1.12949633598328, 1.05980122089386, 0.951755106449127, 0.840038895606995, 0.81215900182724, 0.776918768882751, 0.734996318817139, 0.712943911552429, 0.73274177312851]</td>\n",
+ " <td>0.829819977283</td>\n",
+ " <td>0.51047205925</td>\n",
+ " <td>[0.512880027294159, 0.614199995994568, 0.665300011634827, 0.705659985542297, 0.726400017738342, 0.763320028781891, 0.793179988861084, 0.792519986629486, 0.817960023880005, 0.829819977283478]</td>\n",
+ " <td>[1.3586277961731, 1.10278081893921, 0.960904538631439, 0.845035135746002, 0.784774601459503, 0.686800301074982, 0.603691697120667, 0.598818957805634, 0.545015513896942, 0.510472059249878]</td>\n",
+ " <td>0.746500015259</td>\n",
+ " <td>0.735714316368</td>\n",
+ " <td>[0.512399971485138, 0.601899981498718, 0.643800020217896, 0.679300010204315, 0.689000010490417, 0.714399993419647, 0.736500024795532, 0.735700011253357, 0.744300007820129, 0.746500015258789]</td>\n",
+ " <td>[1.36217331886292, 1.12988150119781, 1.00909614562988, 0.918819069862366, 0.883056640625, 0.818843603134155, 0.768383204936981, 0.770775377750397, 0.754891037940979, 0.735714316368103]</td>\n",
" </tr>\n",
" <tr>\n",
" <td>6</td>\n",
@@ -2498,16 +2471,16 @@
" <td>batch_size=128,epochs=5</td>\n",
" <td>madlib_keras</td>\n",
" <td>4886.20019531</td>\n",
- " <td>[162.552975893021, 328.213756799698, 495.55163693428, 664.478772878647, 834.023772001266, 1004.50640487671, 1174.26192784309, 1344.94176697731, 1518.35087895393, 1692.74292802811]</td>\n",
+ " <td>[162.132050037384, 327.965554952621, 494.437786102295, 662.785852909088, 831.344939947128, 1000.31394791603, 1170.5982530117, 1340.48602604866, 1511.95220208168, 1683.82030010223]</td>\n",
" <td>[u'accuracy']</td>\n",
- " <td>0.734799981117</td>\n",
- " <td>0.835899949074</td>\n",
- " <td>[0.71916002035141, 0.750440001487732, 0.720459997653961, 0.801540017127991, 0.725839972496033, 0.777220010757446, 0.780219972133636, 0.706719994544983, 0.750180006027222, 0.734799981117249]</td>\n",
- " <td>[0.821036815643311, 0.778892278671265, 0.90295821428299, 0.621506929397583, 0.841251850128174, 0.677752196788788, 0.701953232288361, 0.95904815196991, 0.82386702299118, 0.835899949073792]</td>\n",
- " <td>0.709599971771</td>\n",
- " <td>0.930533230305</td>\n",
- " <td>[0.680499970912933, 0.7185999751091, 0.670499980449677, 0.75220000743866, 0.685699999332428, 0.733200013637543, 0.733200013637543, 0.669700026512146, 0.712100028991699, 0.70959997177124]</td>\n",
- " <td>[0.936905562877655, 0.941630959510803, 1.1544371843338, 0.890039265155792, 1.02143895626068, 0.915954768657684, 0.975173354148865, 1.12838399410248, 0.942200124263763, 0.930533230304718]</td>\n",
+ " <td>0.746420025826</td>\n",
+ " <td>0.811488032341</td>\n",
+ " <td>[0.714479982852936, 0.716300010681152, 0.784420013427734, 0.769860029220581, 0.730359971523285, 0.772319972515106, 0.791440010070801, 0.772459983825684, 0.677720010280609, 0.7464200258255]</td>\n",
+ " <td>[0.831750333309174, 0.864085614681244, 0.660020709037781, 0.700904130935669, 0.816842019557953, 0.718474090099335, 0.635774910449982, 0.702050924301147, 1.18704259395599, 0.811488032341003]</td>\n",
+ " <td>0.70300000906</td>\n",
+ " <td>1.0656965971</td>\n",
+ " <td>[0.679899990558624, 0.676699995994568, 0.729300022125244, 0.713900029659271, 0.696600019931793, 0.724799990653992, 0.736299991607666, 0.736199975013733, 0.661800026893616, 0.703000009059906]</td>\n",
+ " <td>[0.961720407009125, 1.03706383705139, 0.896331906318665, 0.848886549472809, 0.986389935016632, 0.962011396884918, 0.896553337574005, 0.922386705875397, 1.3008621931076, 1.0656965970993]</td>\n",
" </tr>\n",
" <tr>\n",
" <td>5</td>\n",
@@ -2516,39 +2489,39 @@
" <td>batch_size=64,epochs=5</td>\n",
" <td>madlib_keras</td>\n",
" <td>4886.20019531</td>\n",
- " <td>[166.255312919617, 332.407908916473, 499.474656820297, 668.450613975525, 838.271963834763, 1008.50526785851, 1178.62056994438, 1349.74808692932, 1522.54409790039, 1697.81855082512]</td>\n",
+ " <td>[165.757286071777, 331.686079978943, 498.744575023651, 666.556679010391, 835.225320100784, 1004.05871200562, 1174.84750103951, 1344.6810259819, 1515.93833899498, 1688.55732393265]</td>\n",
" <td>[u'accuracy']</td>\n",
- " <td>0.585380017757</td>\n",
- " <td>1.2495957613</td>\n",
- " <td>[0.71341997385025, 0.755879998207092, 0.7189000248909, 0.719219982624054, 0.683700025081635, 0.646440029144287, 0.565659999847412, 0.623939990997314, 0.66210001707077, 0.585380017757416]</td>\n",
- " <td>[0.875595450401306, 0.737006664276123, 0.879582762718201, 0.826622664928436, 0.986110627651215, 1.02004647254944, 1.33022010326385, 1.12789785861969, 0.977221727371216, 1.24959576129913]</td>\n",
- " <td>0.591700017452</td>\n",
- " <td>1.32029783726</td>\n",
- " <td>[0.690599977970123, 0.721400022506714, 0.707000017166138, 0.700900018215179, 0.673799991607666, 0.638000011444092, 0.565599977970123, 0.620199978351593, 0.65719997882843, 0.59170001745224]</td>\n",
- " <td>[0.990004479885101, 0.883562862873077, 0.931297481060028, 0.941763758659363, 1.02153491973877, 1.06588494777679, 1.32568216323853, 1.17570757865906, 1.0156409740448, 1.32029783725739]</td>\n",
+ " <td>0.537280023098</td>\n",
+ " <td>1.35161483288</td>\n",
+ " <td>[0.735180020332336, 0.752040028572083, 0.727559983730316, 0.721400022506714, 0.643440008163452, 0.655160009860992, 0.696080029010773, 0.618160009384155, 0.567300021648407, 0.537280023097992]</td>\n",
+ " <td>[0.76802670955658, 0.751371622085571, 0.805666506290436, 0.850524604320526, 1.10775411128998, 1.05535495281219, 0.927546322345734, 1.24175298213959, 1.2892210483551, 1.35161483287811]</td>\n",
+ " <td>0.544900000095</td>\n",
+ " <td>1.33901309967</td>\n",
+ " <td>[0.70660001039505, 0.716899991035461, 0.697200000286102, 0.698300004005432, 0.631600022315979, 0.638100028038025, 0.69489997625351, 0.619000017642975, 0.570500016212463, 0.544900000095367]</td>\n",
+ " <td>[0.875513792037964, 0.916396498680115, 0.912582337856293, 0.935619235038757, 1.15493774414062, 1.10954606533051, 0.960697770118713, 1.31051886081696, 1.26705503463745, 1.33901309967041]</td>\n",
" </tr>\n",
"</table>"
],
"text/plain": [
- "[(15, 2, u\"loss='categorical_crossentropy',optimizer='adam(lr=0.001)',metrics=['accuracy']\", u'batch_size=64,epochs=5', u'madlib_keras', 2159.70019531, [160.21645283699, 325.693609952927, 493.035051822662, 661.953631877899, 831.346253871918, 1001.65144181252, 1171.72806191444, 1342.43474984169, 1515.81184601784, 1689.71926879883], [u'accuracy'], 0.958739995956, 0.12002915144, [0.779980003833771, 0.845019996166229, 0.873939990997314, 0.893540024757385, 0.905359983444214, 0.92519 [...]
- " (16, 2, u\"loss='categorical_crossentropy',optimizer='adam(lr=0.001)',metrics=['accuracy']\", u'batch_size=128,epochs=5', u'madlib_keras', 2159.70019531, [168.006911993027, 334.143662929535, 501.23655295372, 670.235726833344, 840.096035003662, 1010.38422298431, 1180.51074194908, 1351.65223288536, 1524.53146886826, 1699.84652090073], [u'accuracy'], 0.959839999676, 0.119847580791, [0.763499975204468, 0.829859972000122, 0.858560025691986, 0.889379978179932, 0.903039991855621, 0.922 [...]
- " (13, 2, u\"loss='categorical_crossentropy',optimizer='rmsprop(lr=0.001, decay=1e-6)',metrics=['accuracy']\", u'batch_size=64,epochs=5', u'madlib_keras', 2159.70019531, [165.07025885582, 331.04939699173, 498.211872816086, 667.060778856277, 836.708249807358, 1007.20118093491, 1176.76868081093, 1348.24542784691, 1520.97673892975, 1695.76891899109], [u'accuracy'], 0.94892001152, 0.146594136953, [0.786400020122528, 0.839680016040802, 0.869140028953552, 0.878480017185211, 0.9099400043 [...]
- " (14, 2, u\"loss='categorical_crossentropy',optimizer='rmsprop(lr=0.001, decay=1e-6)',metrics=['accuracy']\", u'batch_size=128,epochs=5', u'madlib_keras', 2159.70019531, [161.95653796196, 327.381590843201, 494.75689291954, 663.697657823563, 833.140888929367, 1003.58734488487, 1173.66367697716, 1344.3388338089, 1517.75524687767, 1691.74780988693], [u'accuracy'], 0.942839980125, 0.167295366526, [0.770560026168823, 0.822459995746613, 0.871060013771057, 0.886059999465942, 0.906120002 [...]
- " (11, 2, u\"loss='categorical_crossentropy',optimizer='rmsprop(lr=0.0001, decay=1e-6)',metrics=['accuracy']\", u'batch_size=64,epochs=5', u'madlib_keras', 2159.70019531, [173.035629987717, 339.004810810089, 506.329674959183, 675.320897817612, 845.306622982025, 1015.91489100456, 1185.85607385635, 1357.71336293221, 1530.14687585831, 1705.61137890816], [u'accuracy'], 0.892719984055, 0.309859842062, [0.583959996700287, 0.695259988307953, 0.754980027675629, 0.787720024585724, 0.814040 [...]
- " (9, 2, u\"loss='categorical_crossentropy',optimizer='adam(lr=0.0001)',metrics=['accuracy']\", u'batch_size=64,epochs=5', u'madlib_keras', 2159.70019531, [156.6842648983, 322.059647798538, 489.514621019363, 658.153139829636, 827.505573987961, 997.966463804245, 1168.05154681206, 1338.58688092232, 1511.8177728653, 1685.66397881508], [u'accuracy'], 0.89484000206, 0.305973917246, [0.607659995555878, 0.689279973506927, 0.748199999332428, 0.779420018196106, 0.812300026416779, 0.8309400 [...]
- " (10, 2, u\"loss='categorical_crossentropy',optimizer='adam(lr=0.0001)',metrics=['accuracy']\", u'batch_size=128,epochs=5', u'madlib_keras', 2159.70019531, [158.506701946259, 323.779083013535, 491.302199840546, 660.148201942444, 829.340363025665, 999.844955921173, 1169.83032798767, 1340.5411260128, 1513.8498609066, 1687.69545793533], [u'accuracy'], 0.867579996586, 0.380911707878, [0.576640009880066, 0.66431999206543, 0.707199990749359, 0.749520003795624, 0.778980016708374, 0.7995 [...]
- " (12, 2, u\"loss='categorical_crossentropy',optimizer='rmsprop(lr=0.0001, decay=1e-6)',metrics=['accuracy']\", u'batch_size=128,epochs=5', u'madlib_keras', 2159.70019531, [170.873965024948, 337.211632966995, 504.536657810211, 673.510901927948, 843.392476797104, 1014.04761791229, 1183.94673490524, 1355.76256680489, 1528.15198993683, 1703.5478978157], [u'accuracy'], 0.856419980526, 0.410014539957, [0.547559976577759, 0.647800028324127, 0.698180019855499, 0.746360003948212, 0.769439 [...]
- " (8, 1, u\"loss='categorical_crossentropy',optimizer='adam(lr=0.001)',metrics=['accuracy']\", u'batch_size=128,epochs=5', u'madlib_keras', 4886.20019531, [165.667771816254, 331.63804101944, 498.80203294754, 667.662895917892, 837.58491396904, 1007.91998696327, 1177.68679785728, 1348.86184287071, 1521.96094989777, 1696.78608179092], [u'accuracy'], 0.909500002861, 0.272008836269, [0.752040028572083, 0.828859984874725, 0.851639986038208, 0.888540029525757, 0.888599991798401, 0.894879 [...]
- " (1, 1, u\"loss='categorical_crossentropy',optimizer='adam(lr=0.0001)',metrics=['accuracy']\", u'batch_size=64,epochs=5', u'madlib_keras', 4886.20019531, [168.611300945282, 334.899528980255, 502.037551879883, 671.096584796906, 840.693498849869, 1011.29117488861, 1181.11248087883, 1352.68110394478, 1525.13323402405, 1700.88493180275], [u'accuracy'], 0.920239984989, 0.272924244404, [0.584800004959106, 0.682219982147217, 0.732940018177032, 0.774779975414276, 0.806119978427887, 0.837 [...]
- " (7, 1, u\"loss='categorical_crossentropy',optimizer='adam(lr=0.001)',metrics=['accuracy']\", u'batch_size=64,epochs=5', u'madlib_keras', 4886.20019531, [154.371929883957, 319.090498924255, 486.952117919922, 655.78808093071, 824.799381971359, 995.210795879364, 1165.24253582954, 1336.07785487175, 1508.86772489548, 1682.56205582619], [u'accuracy'], 0.861419975758, 0.432331353426, [0.766240000724792, 0.827859997749329, 0.855539977550507, 0.868900001049042, 0.871540009975433, 0.88238 [...]
- " (3, 1, u\"loss='categorical_crossentropy',optimizer='rmsprop(lr=0.0001, decay=1e-6)',metrics=['accuracy']\", u'batch_size=64,epochs=5', u'madlib_keras', 4886.20019531, [154.969959974289, 319.906549930573, 487.758535861969, 656.377619981766, 825.622062921524, 996.102727890015, 1166.17477893829, 1336.67210102081, 1509.83961796761, 1683.64339399338], [u'accuracy'], 0.821099996567, 0.525239348412, [0.561699986457825, 0.668940007686615, 0.717679977416992, 0.75297999382019, 0.76709997 [...]
- " (2, 1, u\"loss='categorical_crossentropy',optimizer='adam(lr=0.0001)',metrics=['accuracy']\", u'batch_size=128,epochs=5', u'madlib_keras', 4886.20019531, [169.201556921005, 335.50149679184, 502.804733991623, 671.735637903214, 841.536010980606, 1012.17449593544, 1182.0387070179, 1353.62765884399, 1526.14807486534, 1701.52705287933], [u'accuracy'], 0.866079986095, 0.411734908819, [0.535120010375977, 0.633019983768463, 0.683080017566681, 0.727400004863739, 0.757719993591309, 0.7880 [...]
- " (4, 1, u\"loss='categorical_crossentropy',optimizer='rmsprop(lr=0.0001, decay=1e-6)',metrics=['accuracy']\", u'batch_size=128,epochs=5', u'madlib_keras', 4886.20019531, [163.359121799469, 328.837852954865, 496.364542961121, 665.302300930023, 834.891145944595, 1005.38074088097, 1174.84563589096, 1345.91664791107, 1518.93280696869, 1693.73289394379], [u'accuracy'], 0.82415997982, 0.518441617489, [0.521520018577576, 0.612500011920929, 0.638840019702911, 0.686819970607758, 0.7401199 [...]
- " (6, 1, u\"loss='categorical_crossentropy',optimizer='rmsprop(lr=0.001, decay=1e-6)',metrics=['accuracy']\", u'batch_size=128,epochs=5', u'madlib_keras', 4886.20019531, [162.552975893021, 328.213756799698, 495.55163693428, 664.478772878647, 834.023772001266, 1004.50640487671, 1174.26192784309, 1344.94176697731, 1518.35087895393, 1692.74292802811], [u'accuracy'], 0.734799981117, 0.835899949074, [0.71916002035141, 0.750440001487732, 0.720459997653961, 0.801540017127991, 0.725839972 [...]
- " (5, 1, u\"loss='categorical_crossentropy',optimizer='rmsprop(lr=0.001, decay=1e-6)',metrics=['accuracy']\", u'batch_size=64,epochs=5', u'madlib_keras', 4886.20019531, [166.255312919617, 332.407908916473, 499.474656820297, 668.450613975525, 838.271963834763, 1008.50526785851, 1178.62056994438, 1349.74808692932, 1522.54409790039, 1697.81855082512], [u'accuracy'], 0.585380017757, 1.2495957613, [0.71341997385025, 0.755879998207092, 0.7189000248909, 0.719219982624054, 0.6837000250816 [...]
+ "[(16, 2, u\"loss='categorical_crossentropy',optimizer='adam(lr=0.001)',metrics=['accuracy']\", u'batch_size=128,epochs=5', u'madlib_keras', 2159.70019531, [167.736330986023, 333.425091981888, 500.695713996887, 668.302587985992, 837.287312984467, 1006.06942605972, 1176.67615294456, 1346.787348032, 1518.12181210518, 1690.67020988464], [u'accuracy'], 0.957840025425, 0.121589891613, [0.769860029220581, 0.824000000953674, 0.873139977455139, 0.89300000667572, 0.895640015602112, 0.90670 [...]
+ " (14, 2, u\"loss='categorical_crossentropy',optimizer='rmsprop(lr=0.001, decay=1e-6)',metrics=['accuracy']\", u'batch_size=128,epochs=5', u'madlib_keras', 2159.70019531, [161.545518875122, 327.271953105927, 493.721956014633, 662.059704065323, 830.583410024643, 999.47811293602, 1170.08322310448, 1339.875207901, 1511.35515999794, 1682.88088107109], [u'accuracy'], 0.942120015621, 0.166348025203, [0.768679976463318, 0.83459997177124, 0.865559995174408, 0.88782000541687, 0.90008002519 [...]
+ " (15, 2, u\"loss='categorical_crossentropy',optimizer='adam(lr=0.001)',metrics=['accuracy']\", u'batch_size=64,epochs=5', u'madlib_keras', 2159.70019531, [159.585074901581, 325.616278886795, 492.079638957977, 660.141077041626, 828.460551977158, 997.682931900024, 1168.2648499012, 1338.03905391693, 1509.35755109787, 1680.94471693039], [u'accuracy'], 0.957620024681, 0.123506456614, [0.780160009860992, 0.830079972743988, 0.864920020103455, 0.880159974098206, 0.907660007476807, 0.9227 [...]
+ " (13, 2, u\"loss='categorical_crossentropy',optimizer='rmsprop(lr=0.001, decay=1e-6)',metrics=['accuracy']\", u'batch_size=64,epochs=5', u'madlib_keras', 2159.70019531, [164.595175027847, 330.364078044891, 497.435774087906, 665.216387033463, 833.770098924637, 1002.83351397514, 1173.14754009247, 1343.40405297279, 1514.43769907951, 1686.70381498337], [u'accuracy'], 0.950980007648, 0.143490716815, [0.78983998298645, 0.840439975261688, 0.875959992408752, 0.891099989414215, 0.90090000 [...]
+ " (9, 2, u\"loss='categorical_crossentropy',optimizer='adam(lr=0.0001)',metrics=['accuracy']\", u'batch_size=64,epochs=5', u'madlib_keras', 2159.70019531, [155.881345033646, 321.711883068085, 488.33388209343, 656.33606004715, 824.596586942673, 993.720223903656, 1164.30447506905, 1334.05466103554, 1505.45432305336, 1677.10981488228], [u'accuracy'], 0.897319972515, 0.302623033524, [0.585739970207214, 0.694540023803711, 0.738439977169037, 0.788339972496033, 0.815580010414124, 0.83414 [...]
+ " (11, 2, u\"loss='categorical_crossentropy',optimizer='rmsprop(lr=0.0001, decay=1e-6)',metrics=['accuracy']\", u'batch_size=64,epochs=5', u'madlib_keras', 2159.70019531, [172.771174907684, 338.155246973038, 505.790575027466, 673.744323015213, 842.298762083054, 1011.25688695908, 1182.03339600563, 1352.39258003235, 1523.84475708008, 1696.31324291229], [u'accuracy'], 0.889580011368, 0.317797064781, [0.610719978809357, 0.702679991722107, 0.758080005645752, 0.787779986858368, 0.820479 [...]
+ " (10, 2, u\"loss='categorical_crossentropy',optimizer='adam(lr=0.0001)',metrics=['accuracy']\", u'batch_size=128,epochs=5', u'madlib_keras', 2159.70019531, [157.675038099289, 323.760583877563, 489.999938964844, 658.165150880814, 826.338515996933, 995.962205886841, 1166.19140601158, 1335.88773202896, 1507.49120998383, 1679.03732204437], [u'accuracy'], 0.865880012512, 0.386452704668, [0.554459989070892, 0.660399973392487, 0.71670001745224, 0.754540026187897, 0.78276002407074, 0.806 [...]
+ " (12, 2, u\"loss='categorical_crossentropy',optimizer='rmsprop(lr=0.0001, decay=1e-6)',metrics=['accuracy']\", u'batch_size=128,epochs=5', u'madlib_keras', 2159.70019531, [171.145457983017, 336.337003946304, 504.029928922653, 671.705837965012, 840.568361997604, 1009.40254306793, 1179.99340295792, 1350.53466200829, 1521.91818499565, 1694.26437997818], [u'accuracy'], 0.868319988251, 0.377308398485, [0.549000024795532, 0.662000000476837, 0.71262001991272, 0.75543999671936, 0.7838199 [...]
+ " (8, 1, u\"loss='categorical_crossentropy',optimizer='adam(lr=0.001)',metrics=['accuracy']\", u'batch_size=128,epochs=5', u'madlib_keras', 4886.20019531, [165.13839507103, 330.998286962509, 498.064635038376, 665.857858896255, 834.544732093811, 1003.45657801628, 1173.99867010117, 1344.03136301041, 1515.32256889343, 1687.61437892914], [u'accuracy'], 0.901880025864, 0.298958897591, [0.73361998796463, 0.803380012512207, 0.845399975776672, 0.863979995250702, 0.876219987869263, 0.88988 [...]
+ " (3, 1, u\"loss='categorical_crossentropy',optimizer='rmsprop(lr=0.0001, decay=1e-6)',metrics=['accuracy']\", u'batch_size=64,epochs=5', u'madlib_keras', 4886.20019531, [153.837145090103, 319.967153072357, 486.56719994545, 654.53327703476, 822.778059959412, 991.797204971313, 1162.18237304688, 1331.98686599731, 1503.55213904381, 1675.16517400742], [u'accuracy'], 0.830699980259, 0.507873356342, [0.575259983539581, 0.66838002204895, 0.703379988670349, 0.743640005588531, 0.7767999768 [...]
+ " (7, 1, u\"loss='categorical_crossentropy',optimizer='adam(lr=0.001)',metrics=['accuracy']\", u'batch_size=64,epochs=5', u'madlib_keras', 4886.20019531, [153.238389015198, 319.147723913193, 485.898155927658, 653.912374973297, 821.91964006424, 990.972142934799, 1161.34698009491, 1331.33741092682, 1502.62626290321, 1674.06854605675], [u'accuracy'], 0.856920003891, 0.451146841049, [0.761780023574829, 0.809880018234253, 0.847639977931976, 0.856180012226105, 0.873279988765717, 0.85545 [...]
+ " (1, 1, u\"loss='categorical_crossentropy',optimizer='adam(lr=0.0001)',metrics=['accuracy']\", u'batch_size=64,epochs=5', u'madlib_keras', 4886.20019531, [168.396234035492, 334.120693922043, 501.40336894989, 669.109417915344, 837.907988071442, 1006.88363099098, 1177.267567873, 1347.72842693329, 1518.65019989014, 1691.63165593147], [u'accuracy'], 0.902440011501, 0.307300060987, [0.571120023727417, 0.666620016098022, 0.719539999961853, 0.757499992847443, 0.801400005817413, 0.826300 [...]
+ " (2, 1, u\"loss='categorical_crossentropy',optimizer='adam(lr=0.0001)',metrics=['accuracy']\", u'batch_size=128,epochs=5', u'madlib_keras', 4886.20019531, [169.02210688591, 334.716751098633, 502.072870016098, 669.68922495842, 838.805229902267, 1007.46399402618, 1178.16211009026, 1348.57077288628, 1519.57116508484, 1692.27466797829], [u'accuracy'], 0.859300017357, 0.428565859795, [0.532220005989075, 0.620400011539459, 0.674700021743774, 0.71340000629425, 0.747839987277985, 0.78016 [...]
+ " (4, 1, u\"loss='categorical_crossentropy',optimizer='rmsprop(lr=0.0001, decay=1e-6)',metrics=['accuracy']\", u'batch_size=128,epochs=5', u'madlib_keras', 4886.20019531, [162.9407351017, 328.580847024918, 495.239603042603, 663.518301010132, 831.940176010132, 1001.0917840004, 1171.16344308853, 1341.38065099716, 1512.53006696701, 1684.75480604172], [u'accuracy'], 0.829819977283, 0.51047205925, [0.512880027294159, 0.614199995994568, 0.665300011634827, 0.705659985542297, 0.7264000177 [...]
+ " (6, 1, u\"loss='categorical_crossentropy',optimizer='rmsprop(lr=0.001, decay=1e-6)',metrics=['accuracy']\", u'batch_size=128,epochs=5', u'madlib_keras', 4886.20019531, [162.132050037384, 327.965554952621, 494.437786102295, 662.785852909088, 831.344939947128, 1000.31394791603, 1170.5982530117, 1340.48602604866, 1511.95220208168, 1683.82030010223], [u'accuracy'], 0.746420025826, 0.811488032341, [0.714479982852936, 0.716300010681152, 0.784420013427734, 0.769860029220581, 0.73035997 [...]
+ " (5, 1, u\"loss='categorical_crossentropy',optimizer='rmsprop(lr=0.001, decay=1e-6)',metrics=['accuracy']\", u'batch_size=64,epochs=5', u'madlib_keras', 4886.20019531, [165.757286071777, 331.686079978943, 498.744575023651, 666.556679010391, 835.225320100784, 1004.05871200562, 1174.84750103951, 1344.6810259819, 1515.93833899498, 1688.55732393265], [u'accuracy'], 0.537280023098, 1.35161483288, [0.735180020332336, 0.752040028572083, 0.727559983730316, 0.721400022506714, 0.6434400081 [...]
]
},
- "execution_count": 37,
+ "execution_count": 28,
"metadata": {},
"output_type": "execute_result"
}
@@ -2568,7 +2541,7 @@
},
{
"cell_type": "code",
- "execution_count": 7,
+ "execution_count": 6,
"metadata": {},
"outputs": [],
"source": [
@@ -2590,7 +2563,7 @@
},
{
"cell_type": "code",
- "execution_count": 8,
+ "execution_count": 7,
"metadata": {
"scrolled": false
},
@@ -2599,9 +2572,7 @@
"name": "stdout",
"output_type": "stream",
"text": [
- " * postgresql://gpadmin@localhost:8000/cifar_places\n",
"16 rows affected.\n",
- " * postgresql://gpadmin@localhost:8000/cifar_places\n",
"1 rows affected.\n"
]
},
@@ -3385,7 +3356,7 @@
{
"data": {
"text/html": [
- "<img src=\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAABDgAAAIcCAYAAAAT/R6VAAAgAElEQVR4XuydB3hc1Zn+3ynqXbJkFVvFXe4V3LBNCc1AQkI1KYRUIG2TzWZTNiHZJCT8N7ubZGFDQkkBJxAWCJhiim1cwLj3KtuyLcmyetdoNOX/vHfulUbjGU3RzOiO9J3nMSOkc+8553ePdL/73q8YIE0ICAEhIASEgBAQAkJACAgBISAEhIAQEAIxTsAQ4/OX6QsBISAEhIAQEAJCQAgIASEgBISAEBACQgAicMgmGK0EnCEs/LMA/hjCcYEe8hUAvwXwKAB+PdT2AoBPALgdAL/We5sJ4KA6yT8BuFfvE5b5CQEhIASEAOR+OvybIBVAuzqNXAANwz+lsM/ACGAXgBwAUwD0eBmBfe4EcBuARQDIgvuzBsAOAM8BeEX9XtgnqIMTuttRg01nG4D [...]
+ "<img src=\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAA4QAAAHCCAYAAAC30AdjAAAgAElEQVR4Xux9B3hb1fn+qy1575FhZzhxFtk7ISEEAgkjECidv1JogZYuymr5l5aWFn6/UjqAlpaWUkpLS0fYJDR7QAjZezrLe29blqzxf94rXVsxHpIly7LznefRcxPp3nO+857r+933fEsDaYKAICAICAKCgCAgCAgCgoAgIAgIApckAppLctYy6Usdgf8D8F0AmQBKewGGGYAVwAsAvtqL6+USQUAQEAQEgchDQHRD/6+JFsAeAPsBfLn/xREJ+hGBuQB2AJgPYGc/ynFJDC2E8JJY5oicpDsAqUYCOB/A+T2dOhiV/jQA+7wTnw1gd08gyO+CgCAgCEQgAqIbgl8UblT+DsANAN4Nvruw9nCnV/axAC50MvI1AO4CQLKQCsAG4CSAtd7rSsIqbWg [...]
],
"text/plain": [
"<IPython.core.display.HTML object>"
@@ -3395,3141 +3366,92 @@
"output_type": "display_data"
},
{
- "data": {
- "text/plain": [
- "<matplotlib.legend.Legend at 0x154945910>"
- ]
- },
- "execution_count": 8,
- "metadata": {},
- "output_type": "execute_result"
- },
- {
- "data": {
- "text/plain": [
- "Text(0.5,21,'Iteration')"
- ]
- },
- "execution_count": 8,
- "metadata": {},
- "output_type": "execute_result"
- },
- {
- "data": {
- "text/plain": [
- "Text(0.5,1,'Training Accuracy')"
- ]
- },
- "execution_count": 8,
- "metadata": {},
- "output_type": "execute_result"
- },
- {
- "data": {
- "text/plain": [
- "Text(0.5,21,'Iteration')"
- ]
- },
- "execution_count": 8,
- "metadata": {},
- "output_type": "execute_result"
- },
- {
- "data": {
- "text/plain": [
- "Text(0.5,1,'Training Loss (Cross Entropy)')"
- ]
- },
- "execution_count": 8,
- "metadata": {},
- "output_type": "execute_result"
- },
- {
- "name": "stdout",
- "output_type": "stream",
- "text": [
- " * postgresql://gpadmin@localhost:8000/cifar_places\n",
- "1 rows affected.\n"
- ]
- },
- {
- "data": {
- "text/plain": [
- "[<matplotlib.lines.Line2D at 0x156a53950>]"
- ]
- },
- "execution_count": 8,
- "metadata": {},
- "output_type": "execute_result"
- },
- {
"name": "stdout",
"output_type": "stream",
"text": [
- " * postgresql://gpadmin@localhost:8000/cifar_places\n",
- "16 rows affected.\n",
- " * postgresql://gpadmin@localhost:8000/cifar_places\n",
+ "1 rows affected.\n",
+ "1 rows affected.\n",
+ "1 rows affected.\n",
+ "1 rows affected.\n",
+ "1 rows affected.\n",
+ "1 rows affected.\n",
+ "1 rows affected.\n",
+ "1 rows affected.\n",
+ "1 rows affected.\n",
+ "1 rows affected.\n",
+ "1 rows affected.\n",
+ "1 rows affected.\n",
+ "1 rows affected.\n",
+ "1 rows affected.\n",
+ "1 rows affected.\n",
"1 rows affected.\n"
]
- },
- {
- "data": {
- "text/plain": [
- "[<matplotlib.lines.Line2D at 0x156a331d0>]"
- ]
- },
- "execution_count": 8,
- "metadata": {},
- "output_type": "execute_result"
- },
+ }
+ ],
+ "source": [
+ "df_results = %sql SELECT * FROM cifar10_multi_model_info ORDER BY training_loss_final ASC LIMIT 100;\n",
+ "df_results = df_results.DataFrame()\n",
+ "\n",
+ "df_summary = %sql SELECT * FROM cifar10_multi_model_summary;\n",
+ "df_summary = df_summary.DataFrame()\n",
+ "\n",
+ "#set up plots\n",
+ "fig, axs = plt.subplots(nrows=1, ncols=2, figsize=(10,5))\n",
+ "fig.legend(ncol=4)\n",
+ "fig.tight_layout()\n",
+ "\n",
+ "ax_metric = axs[0]\n",
+ "ax_loss = axs[1]\n",
+ "\n",
+ "ax_metric.xaxis.set_major_locator(MaxNLocator(integer=True))\n",
+ "ax_metric.set_xlabel('Iteration')\n",
+ "#ax_metric.set_ylabel('Accuracy')\n",
+ "ax_metric.set_title('Training Accuracy')\n",
+ "\n",
+ "ax_loss.xaxis.set_major_locator(MaxNLocator(integer=True))\n",
+ "ax_loss.set_xlabel('Iteration')\n",
+ "#ax_loss.set_ylabel('Cross Entropy Loss')\n",
+ "ax_loss.set_title('Training Loss (Cross Entropy)')\n",
+ "\n",
+ "iters = df_summary['metrics_iters'][0]\n",
+ "\n",
+ "for mst_key in df_results['mst_key']:\n",
+ " df_output_info = %sql SELECT training_metrics,training_loss FROM cifar10_multi_model_info WHERE mst_key = $mst_key\n",
+ " df_output_info = df_output_info.DataFrame()\n",
+ " training_metrics = df_output_info['training_metrics'][0]\n",
+ " training_loss = df_output_info['training_loss'][0]\n",
+ "\n",
+ " #ax_metric.plot(iters, training_metrics, label=mst_key, marker='o')\n",
+ " #ax_metric.plot(iters, training_metrics, marker='o')\n",
+ " ax_metric.plot(iters, training_metrics)\n",
+ " \n",
+ " #ax_loss.plot(iters, training_loss, label=mst_key, marker='o')\n",
+ " #ax_loss.plot(iters, training_loss, marker='o')\n",
+ " ax_loss.plot(iters, training_loss)\n",
+ "\n",
+ "plt.legend();\n",
+ "# fig.savefig('./lc_keras_fit.png', dpi = 300)"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "Validation data"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 8,
+ "metadata": {
+ "scrolled": false
+ },
+ "outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
- " * postgresql://gpadmin@localhost:8000/cifar_places\n",
"16 rows affected.\n",
- " * postgresql://gpadmin@localhost:8000/cifar_places\n",
- "1 rows affected.\n"
- ]
- },
- {
- "data": {
- "text/plain": [
- "[<matplotlib.lines.Line2D at 0x156a5f250>]"
- ]
- },
- "execution_count": 8,
- "metadata": {},
- "output_type": "execute_result"
- },
- {
- "name": "stdout",
- "output_type": "stream",
- "text": [
- " * postgresql://gpadmin@localhost:8000/cifar_places\n",
- "16 rows affected.\n",
- " * postgresql://gpadmin@localhost:8000/cifar_places\n",
- "1 rows affected.\n"
- ]
- },
- {
- "data": {
- "text/plain": [
- "[<matplotlib.lines.Line2D at 0x156a45e90>]"
- ]
- },
- "execution_count": 8,
- "metadata": {},
- "output_type": "execute_result"
- },
- {
- "name": "stdout",
- "output_type": "stream",
- "text": [
- " * postgresql://gpadmin@localhost:8000/cifar_places\n",
- "16 rows affected.\n",
- " * postgresql://gpadmin@localhost:8000/cifar_places\n",
- "1 rows affected.\n"
- ]
- },
- {
- "data": {
- "text/plain": [
- "[<matplotlib.lines.Line2D at 0x156a5f310>]"
- ]
- },
- "execution_count": 8,
- "metadata": {},
- "output_type": "execute_result"
- },
- {
- "name": "stdout",
- "output_type": "stream",
- "text": [
- " * postgresql://gpadmin@localhost:8000/cifar_places\n",
- "16 rows affected.\n",
- " * postgresql://gpadmin@localhost:8000/cifar_places\n",
- "1 rows affected.\n"
- ]
- },
- {
- "data": {
- "text/plain": [
- "[<matplotlib.lines.Line2D at 0x156a82290>]"
- ]
- },
- "execution_count": 8,
- "metadata": {},
- "output_type": "execute_result"
- },
- {
- "name": "stdout",
- "output_type": "stream",
- "text": [
- " * postgresql://gpadmin@localhost:8000/cifar_places\n",
- "16 rows affected.\n",
- " * postgresql://gpadmin@localhost:8000/cifar_places\n",
- "1 rows affected.\n"
- ]
- },
- {
- "data": {
- "text/plain": [
- "[<matplotlib.lines.Line2D at 0x156a827d0>]"
- ]
- },
- "execution_count": 8,
- "metadata": {},
- "output_type": "execute_result"
- },
- {
- "name": "stdout",
- "output_type": "stream",
- "text": [
- " * postgresql://gpadmin@localhost:8000/cifar_places\n",
- "16 rows affected.\n",
- " * postgresql://gpadmin@localhost:8000/cifar_places\n",
- "1 rows affected.\n"
- ]
- },
- {
- "data": {
- "text/plain": [
- "[<matplotlib.lines.Line2D at 0x156a82d10>]"
- ]
- },
- "execution_count": 8,
- "metadata": {},
- "output_type": "execute_result"
- },
- {
- "name": "stdout",
- "output_type": "stream",
- "text": [
- " * postgresql://gpadmin@localhost:8000/cifar_places\n",
- "16 rows affected.\n",
- " * postgresql://gpadmin@localhost:8000/cifar_places\n",
- "1 rows affected.\n"
- ]
- },
- {
- "data": {
- "text/plain": [
- "[<matplotlib.lines.Line2D at 0x156a82790>]"
- ]
- },
- "execution_count": 8,
- "metadata": {},
- "output_type": "execute_result"
- },
- {
- "name": "stdout",
- "output_type": "stream",
- "text": [
- " * postgresql://gpadmin@localhost:8000/cifar_places\n",
- "16 rows affected.\n",
- " * postgresql://gpadmin@localhost:8000/cifar_places\n",
- "1 rows affected.\n"
- ]
- },
- {
- "data": {
- "text/plain": [
- "[<matplotlib.lines.Line2D at 0x156a45dd0>]"
- ]
- },
- "execution_count": 8,
- "metadata": {},
- "output_type": "execute_result"
- },
- {
- "name": "stdout",
- "output_type": "stream",
- "text": [
- " * postgresql://gpadmin@localhost:8000/cifar_places\n",
- "16 rows affected.\n",
- " * postgresql://gpadmin@localhost:8000/cifar_places\n",
- "1 rows affected.\n"
- ]
- },
- {
- "data": {
- "text/plain": [
- "[<matplotlib.lines.Line2D at 0x156a97610>]"
- ]
- },
- "execution_count": 8,
- "metadata": {},
- "output_type": "execute_result"
- },
- {
- "name": "stdout",
- "output_type": "stream",
- "text": [
- " * postgresql://gpadmin@localhost:8000/cifar_places\n",
- "16 rows affected.\n",
- " * postgresql://gpadmin@localhost:8000/cifar_places\n",
- "1 rows affected.\n"
- ]
- },
- {
- "data": {
- "text/plain": [
- "[<matplotlib.lines.Line2D at 0x156a97b50>]"
- ]
- },
- "execution_count": 8,
- "metadata": {},
- "output_type": "execute_result"
- },
- {
- "name": "stdout",
- "output_type": "stream",
- "text": [
- " * postgresql://gpadmin@localhost:8000/cifar_places\n",
- "16 rows affected.\n",
- " * postgresql://gpadmin@localhost:8000/cifar_places\n",
- "1 rows affected.\n"
- ]
- },
- {
- "data": {
- "text/plain": [
- "[<matplotlib.lines.Line2D at 0x156aa40d0>]"
- ]
- },
- "execution_count": 8,
- "metadata": {},
- "output_type": "execute_result"
- },
- {
- "name": "stdout",
- "output_type": "stream",
- "text": [
- " * postgresql://gpadmin@localhost:8000/cifar_places\n",
- "16 rows affected.\n",
- " * postgresql://gpadmin@localhost:8000/cifar_places\n",
- "1 rows affected.\n"
- ]
- },
- {
- "data": {
- "text/plain": [
- "[<matplotlib.lines.Line2D at 0x156a97b10>]"
- ]
- },
- "execution_count": 8,
- "metadata": {},
- "output_type": "execute_result"
- },
- {
- "name": "stdout",
- "output_type": "stream",
- "text": [
- " * postgresql://gpadmin@localhost:8000/cifar_places\n",
- "16 rows affected.\n",
- " * postgresql://gpadmin@localhost:8000/cifar_places\n",
- "1 rows affected.\n"
- ]
- },
- {
- "data": {
- "text/plain": [
- "[<matplotlib.lines.Line2D at 0x156aa4110>]"
- ]
- },
- "execution_count": 8,
- "metadata": {},
- "output_type": "execute_result"
- },
- {
- "name": "stdout",
- "output_type": "stream",
- "text": [
- " * postgresql://gpadmin@localhost:8000/cifar_places\n",
- "16 rows affected.\n",
- " * postgresql://gpadmin@localhost:8000/cifar_places\n",
- "1 rows affected.\n"
- ]
- },
- {
- "data": {
- "text/plain": [
- "[<matplotlib.lines.Line2D at 0x156aa4990>]"
- ]
- },
- "execution_count": 8,
- "metadata": {},
- "output_type": "execute_result"
- },
- {
- "name": "stdout",
- "output_type": "stream",
- "text": [
- " * postgresql://gpadmin@localhost:8000/cifar_places\n",
- "16 rows affected.\n",
- " * postgresql://gpadmin@localhost:8000/cifar_places\n",
- "1 rows affected.\n"
- ]
- },
- {
- "data": {
- "application/javascript": [
- "/* Put everything inside the global mpl namespace */\n",
- "window.mpl = {};\n",
- "\n",
- "\n",
- "mpl.get_websocket_type = function() {\n",
- " if (typeof(WebSocket) !== 'undefined') {\n",
- " return WebSocket;\n",
- " } else if (typeof(MozWebSocket) !== 'undefined') {\n",
- " return MozWebSocket;\n",
- " } else {\n",
- " alert('Your browser does not have WebSocket support.' +\n",
- " 'Please try Chrome, Safari or Firefox ≥ 6. ' +\n",
- " 'Firefox 4 and 5 are also supported but you ' +\n",
- " 'have to enable WebSockets in about:config.');\n",
- " };\n",
- "}\n",
- "\n",
- "mpl.figure = function(figure_id, websocket, ondownload, parent_element) {\n",
- " this.id = figure_id;\n",
- "\n",
- " this.ws = websocket;\n",
- "\n",
- " this.supports_binary = (this.ws.binaryType != undefined);\n",
- "\n",
- " if (!this.supports_binary) {\n",
- " var warnings = document.getElementById(\"mpl-warnings\");\n",
- " if (warnings) {\n",
- " warnings.style.display = 'block';\n",
- " warnings.textContent = (\n",
- " \"This browser does not support binary websocket messages. \" +\n",
- " \"Performance may be slow.\");\n",
- " }\n",
- " }\n",
- "\n",
- " this.imageObj = new Image();\n",
- "\n",
- " this.context = undefined;\n",
- " this.message = undefined;\n",
- " this.canvas = undefined;\n",
- " this.rubberband_canvas = undefined;\n",
- " this.rubberband_context = undefined;\n",
- " this.format_dropdown = undefined;\n",
- "\n",
- " this.image_mode = 'full';\n",
- "\n",
- " this.root = $('<div/>');\n",
- " this._root_extra_style(this.root)\n",
- " this.root.attr('style', 'display: inline-block');\n",
- "\n",
- " $(parent_element).append(this.root);\n",
- "\n",
- " this._init_header(this);\n",
- " this._init_canvas(this);\n",
- " this._init_toolbar(this);\n",
- "\n",
- " var fig = this;\n",
- "\n",
- " this.waiting = false;\n",
- "\n",
- " this.ws.onopen = function () {\n",
- " fig.send_message(\"supports_binary\", {value: fig.supports_binary});\n",
- " fig.send_message(\"send_image_mode\", {});\n",
- " if (mpl.ratio != 1) {\n",
- " fig.send_message(\"set_dpi_ratio\", {'dpi_ratio': mpl.ratio});\n",
- " }\n",
- " fig.send_message(\"refresh\", {});\n",
- " }\n",
- "\n",
- " this.imageObj.onload = function() {\n",
- " if (fig.image_mode == 'full') {\n",
- " // Full images could contain transparency (where diff images\n",
- " // almost always do), so we need to clear the canvas so that\n",
- " // there is no ghosting.\n",
- " fig.context.clearRect(0, 0, fig.canvas.width, fig.canvas.height);\n",
- " }\n",
- " fig.context.drawImage(fig.imageObj, 0, 0);\n",
- " };\n",
- "\n",
- " this.imageObj.onunload = function() {\n",
- " fig.ws.close();\n",
- " }\n",
- "\n",
- " this.ws.onmessage = this._make_on_message_function(this);\n",
- "\n",
- " this.ondownload = ondownload;\n",
- "}\n",
- "\n",
- "mpl.figure.prototype._init_header = function() {\n",
- " var titlebar = $(\n",
- " '<div class=\"ui-dialog-titlebar ui-widget-header ui-corner-all ' +\n",
- " 'ui-helper-clearfix\"/>');\n",
- " var titletext = $(\n",
- " '<div class=\"ui-dialog-title\" style=\"width: 100%; ' +\n",
- " 'text-align: center; padding: 3px;\"/>');\n",
- " titlebar.append(titletext)\n",
- " this.root.append(titlebar);\n",
- " this.header = titletext[0];\n",
- "}\n",
- "\n",
- "\n",
- "\n",
- "mpl.figure.prototype._canvas_extra_style = function(canvas_div) {\n",
- "\n",
- "}\n",
- "\n",
- "\n",
- "mpl.figure.prototype._root_extra_style = function(canvas_div) {\n",
- "\n",
- "}\n",
- "\n",
- "mpl.figure.prototype._init_canvas = function() {\n",
- " var fig = this;\n",
- "\n",
- " var canvas_div = $('<div/>');\n",
- "\n",
- " canvas_div.attr('style', 'position: relative; clear: both; outline: 0');\n",
- "\n",
- " function canvas_keyboard_event(event) {\n",
- " return fig.key_event(event, event['data']);\n",
- " }\n",
- "\n",
- " canvas_div.keydown('key_press', canvas_keyboard_event);\n",
- " canvas_div.keyup('key_release', canvas_keyboard_event);\n",
- " this.canvas_div = canvas_div\n",
- " this._canvas_extra_style(canvas_div)\n",
- " this.root.append(canvas_div);\n",
- "\n",
- " var canvas = $('<canvas/>');\n",
- " canvas.addClass('mpl-canvas');\n",
- " canvas.attr('style', \"left: 0; top: 0; z-index: 0; outline: 0\")\n",
- "\n",
- " this.canvas = canvas[0];\n",
- " this.context = canvas[0].getContext(\"2d\");\n",
- "\n",
- " var backingStore = this.context.backingStorePixelRatio ||\n",
- "\tthis.context.webkitBackingStorePixelRatio ||\n",
- "\tthis.context.mozBackingStorePixelRatio ||\n",
- "\tthis.context.msBackingStorePixelRatio ||\n",
- "\tthis.context.oBackingStorePixelRatio ||\n",
- "\tthis.context.backingStorePixelRatio || 1;\n",
- "\n",
- " mpl.ratio = (window.devicePixelRatio || 1) / backingStore;\n",
- "\n",
- " var rubberband = $('<canvas/>');\n",
- " rubberband.attr('style', \"position: absolute; left: 0; top: 0; z-index: 1;\")\n",
- "\n",
- " var pass_mouse_events = true;\n",
- "\n",
- " canvas_div.resizable({\n",
- " start: function(event, ui) {\n",
- " pass_mouse_events = false;\n",
- " },\n",
- " resize: function(event, ui) {\n",
- " fig.request_resize(ui.size.width, ui.size.height);\n",
- " },\n",
- " stop: function(event, ui) {\n",
- " pass_mouse_events = true;\n",
- " fig.request_resize(ui.size.width, ui.size.height);\n",
- " },\n",
- " });\n",
- "\n",
- " function mouse_event_fn(event) {\n",
- " if (pass_mouse_events)\n",
- " return fig.mouse_event(event, event['data']);\n",
- " }\n",
- "\n",
- " rubberband.mousedown('button_press', mouse_event_fn);\n",
- " rubberband.mouseup('button_release', mouse_event_fn);\n",
- " // Throttle sequential mouse events to 1 every 20ms.\n",
- " rubberband.mousemove('motion_notify', mouse_event_fn);\n",
- "\n",
- " rubberband.mouseenter('figure_enter', mouse_event_fn);\n",
- " rubberband.mouseleave('figure_leave', mouse_event_fn);\n",
- "\n",
- " canvas_div.on(\"wheel\", function (event) {\n",
- " event = event.originalEvent;\n",
- " event['data'] = 'scroll'\n",
- " if (event.deltaY < 0) {\n",
- " event.step = 1;\n",
- " } else {\n",
- " event.step = -1;\n",
- " }\n",
- " mouse_event_fn(event);\n",
- " });\n",
- "\n",
- " canvas_div.append(canvas);\n",
- " canvas_div.append(rubberband);\n",
- "\n",
- " this.rubberband = rubberband;\n",
- " this.rubberband_canvas = rubberband[0];\n",
- " this.rubberband_context = rubberband[0].getContext(\"2d\");\n",
- " this.rubberband_context.strokeStyle = \"#000000\";\n",
- "\n",
- " this._resize_canvas = function(width, height) {\n",
- " // Keep the size of the canvas, canvas container, and rubber band\n",
- " // canvas in synch.\n",
- " canvas_div.css('width', width)\n",
- " canvas_div.css('height', height)\n",
- "\n",
- " canvas.attr('width', width * mpl.ratio);\n",
- " canvas.attr('height', height * mpl.ratio);\n",
- " canvas.attr('style', 'width: ' + width + 'px; height: ' + height + 'px;');\n",
- "\n",
- " rubberband.attr('width', width);\n",
- " rubberband.attr('height', height);\n",
- " }\n",
- "\n",
- " // Set the figure to an initial 600x600px, this will subsequently be updated\n",
- " // upon first draw.\n",
- " this._resize_canvas(600, 600);\n",
- "\n",
- " // Disable right mouse context menu.\n",
- " $(this.rubberband_canvas).bind(\"contextmenu\",function(e){\n",
- " return false;\n",
- " });\n",
- "\n",
- " function set_focus () {\n",
- " canvas.focus();\n",
- " canvas_div.focus();\n",
- " }\n",
- "\n",
- " window.setTimeout(set_focus, 100);\n",
- "}\n",
- "\n",
- "mpl.figure.prototype._init_toolbar = function() {\n",
- " var fig = this;\n",
- "\n",
- " var nav_element = $('<div/>')\n",
- " nav_element.attr('style', 'width: 100%');\n",
- " this.root.append(nav_element);\n",
- "\n",
- " // Define a callback function for later on.\n",
- " function toolbar_event(event) {\n",
- " return fig.toolbar_button_onclick(event['data']);\n",
- " }\n",
- " function toolbar_mouse_event(event) {\n",
- " return fig.toolbar_button_onmouseover(event['data']);\n",
- " }\n",
- "\n",
- " for(var toolbar_ind in mpl.toolbar_items) {\n",
- " var name = mpl.toolbar_items[toolbar_ind][0];\n",
- " var tooltip = mpl.toolbar_items[toolbar_ind][1];\n",
- " var image = mpl.toolbar_items[toolbar_ind][2];\n",
- " var method_name = mpl.toolbar_items[toolbar_ind][3];\n",
- "\n",
- " if (!name) {\n",
- " // put a spacer in here.\n",
- " continue;\n",
- " }\n",
- " var button = $('<button/>');\n",
- " button.addClass('ui-button ui-widget ui-state-default ui-corner-all ' +\n",
- " 'ui-button-icon-only');\n",
- " button.attr('role', 'button');\n",
- " button.attr('aria-disabled', 'false');\n",
- " button.click(method_name, toolbar_event);\n",
- " button.mouseover(tooltip, toolbar_mouse_event);\n",
- "\n",
- " var icon_img = $('<span/>');\n",
- " icon_img.addClass('ui-button-icon-primary ui-icon');\n",
- " icon_img.addClass(image);\n",
- " icon_img.addClass('ui-corner-all');\n",
- "\n",
- " var tooltip_span = $('<span/>');\n",
- " tooltip_span.addClass('ui-button-text');\n",
- " tooltip_span.html(tooltip);\n",
- "\n",
- " button.append(icon_img);\n",
- " button.append(tooltip_span);\n",
- "\n",
- " nav_element.append(button);\n",
- " }\n",
- "\n",
- " var fmt_picker_span = $('<span/>');\n",
- "\n",
- " var fmt_picker = $('<select/>');\n",
- " fmt_picker.addClass('mpl-toolbar-option ui-widget ui-widget-content');\n",
- " fmt_picker_span.append(fmt_picker);\n",
- " nav_element.append(fmt_picker_span);\n",
- " this.format_dropdown = fmt_picker[0];\n",
- "\n",
- " for (var ind in mpl.extensions) {\n",
- " var fmt = mpl.extensions[ind];\n",
- " var option = $(\n",
- " '<option/>', {selected: fmt === mpl.default_extension}).html(fmt);\n",
- " fmt_picker.append(option)\n",
- " }\n",
- "\n",
- " // Add hover states to the ui-buttons\n",
- " $( \".ui-button\" ).hover(\n",
- " function() { $(this).addClass(\"ui-state-hover\");},\n",
- " function() { $(this).removeClass(\"ui-state-hover\");}\n",
- " );\n",
- "\n",
- " var status_bar = $('<span class=\"mpl-message\"/>');\n",
- " nav_element.append(status_bar);\n",
- " this.message = status_bar[0];\n",
- "}\n",
- "\n",
- "mpl.figure.prototype.request_resize = function(x_pixels, y_pixels) {\n",
- " // Request matplotlib to resize the figure. Matplotlib will then trigger a resize in the client,\n",
- " // which will in turn request a refresh of the image.\n",
- " this.send_message('resize', {'width': x_pixels, 'height': y_pixels});\n",
- "}\n",
- "\n",
- "mpl.figure.prototype.send_message = function(type, properties) {\n",
- " properties['type'] = type;\n",
- " properties['figure_id'] = this.id;\n",
- " this.ws.send(JSON.stringify(properties));\n",
- "}\n",
- "\n",
- "mpl.figure.prototype.send_draw_message = function() {\n",
- " if (!this.waiting) {\n",
- " this.waiting = true;\n",
- " this.ws.send(JSON.stringify({type: \"draw\", figure_id: this.id}));\n",
- " }\n",
- "}\n",
- "\n",
- "\n",
- "mpl.figure.prototype.handle_save = function(fig, msg) {\n",
- " var format_dropdown = fig.format_dropdown;\n",
- " var format = format_dropdown.options[format_dropdown.selectedIndex].value;\n",
- " fig.ondownload(fig, format);\n",
- "}\n",
- "\n",
- "\n",
- "mpl.figure.prototype.handle_resize = function(fig, msg) {\n",
- " var size = msg['size'];\n",
- " if (size[0] != fig.canvas.width || size[1] != fig.canvas.height) {\n",
- " fig._resize_canvas(size[0], size[1]);\n",
- " fig.send_message(\"refresh\", {});\n",
- " };\n",
- "}\n",
- "\n",
- "mpl.figure.prototype.handle_rubberband = function(fig, msg) {\n",
- " var x0 = msg['x0'] / mpl.ratio;\n",
- " var y0 = (fig.canvas.height - msg['y0']) / mpl.ratio;\n",
- " var x1 = msg['x1'] / mpl.ratio;\n",
- " var y1 = (fig.canvas.height - msg['y1']) / mpl.ratio;\n",
- " x0 = Math.floor(x0) + 0.5;\n",
- " y0 = Math.floor(y0) + 0.5;\n",
- " x1 = Math.floor(x1) + 0.5;\n",
- " y1 = Math.floor(y1) + 0.5;\n",
- " var min_x = Math.min(x0, x1);\n",
- " var min_y = Math.min(y0, y1);\n",
- " var width = Math.abs(x1 - x0);\n",
- " var height = Math.abs(y1 - y0);\n",
- "\n",
- " fig.rubberband_context.clearRect(\n",
- " 0, 0, fig.canvas.width, fig.canvas.height);\n",
- "\n",
- " fig.rubberband_context.strokeRect(min_x, min_y, width, height);\n",
- "}\n",
- "\n",
- "mpl.figure.prototype.handle_figure_label = function(fig, msg) {\n",
- " // Updates the figure title.\n",
- " fig.header.textContent = msg['label'];\n",
- "}\n",
- "\n",
- "mpl.figure.prototype.handle_cursor = function(fig, msg) {\n",
- " var cursor = msg['cursor'];\n",
- " switch(cursor)\n",
- " {\n",
- " case 0:\n",
- " cursor = 'pointer';\n",
- " break;\n",
- " case 1:\n",
- " cursor = 'default';\n",
- " break;\n",
- " case 2:\n",
- " cursor = 'crosshair';\n",
- " break;\n",
- " case 3:\n",
- " cursor = 'move';\n",
- " break;\n",
- " }\n",
- " fig.rubberband_canvas.style.cursor = cursor;\n",
- "}\n",
- "\n",
- "mpl.figure.prototype.handle_message = function(fig, msg) {\n",
- " fig.message.textContent = msg['message'];\n",
- "}\n",
- "\n",
- "mpl.figure.prototype.handle_draw = function(fig, msg) {\n",
- " // Request the server to send over a new figure.\n",
- " fig.send_draw_message();\n",
- "}\n",
- "\n",
- "mpl.figure.prototype.handle_image_mode = function(fig, msg) {\n",
- " fig.image_mode = msg['mode'];\n",
- "}\n",
- "\n",
- "mpl.figure.prototype.updated_canvas_event = function() {\n",
- " // Called whenever the canvas gets updated.\n",
- " this.send_message(\"ack\", {});\n",
- "}\n",
- "\n",
- "// A function to construct a web socket function for onmessage handling.\n",
- "// Called in the figure constructor.\n",
- "mpl.figure.prototype._make_on_message_function = function(fig) {\n",
- " return function socket_on_message(evt) {\n",
- " if (evt.data instanceof Blob) {\n",
- " /* FIXME: We get \"Resource interpreted as Image but\n",
- " * transferred with MIME type text/plain:\" errors on\n",
- " * Chrome. But how to set the MIME type? It doesn't seem\n",
- " * to be part of the websocket stream */\n",
- " evt.data.type = \"image/png\";\n",
- "\n",
- " /* Free the memory for the previous frames */\n",
- " if (fig.imageObj.src) {\n",
- " (window.URL || window.webkitURL).revokeObjectURL(\n",
- " fig.imageObj.src);\n",
- " }\n",
- "\n",
- " fig.imageObj.src = (window.URL || window.webkitURL).createObjectURL(\n",
- " evt.data);\n",
- " fig.updated_canvas_event();\n",
- " fig.waiting = false;\n",
- " return;\n",
- " }\n",
- " else if (typeof evt.data === 'string' && evt.data.slice(0, 21) == \"data:image/png;base64\") {\n",
- " fig.imageObj.src = evt.data;\n",
- " fig.updated_canvas_event();\n",
- " fig.waiting = false;\n",
- " return;\n",
- " }\n",
- "\n",
- " var msg = JSON.parse(evt.data);\n",
- " var msg_type = msg['type'];\n",
- "\n",
- " // Call the \"handle_{type}\" callback, which takes\n",
- " // the figure and JSON message as its only arguments.\n",
- " try {\n",
- " var callback = fig[\"handle_\" + msg_type];\n",
- " } catch (e) {\n",
- " console.log(\"No handler for the '\" + msg_type + \"' message type: \", msg);\n",
- " return;\n",
- " }\n",
- "\n",
- " if (callback) {\n",
- " try {\n",
- " // console.log(\"Handling '\" + msg_type + \"' message: \", msg);\n",
- " callback(fig, msg);\n",
- " } catch (e) {\n",
- " console.log(\"Exception inside the 'handler_\" + msg_type + \"' callback:\", e, e.stack, msg);\n",
- " }\n",
- " }\n",
- " };\n",
- "}\n",
- "\n",
- "// from http://stackoverflow.com/questions/1114465/getting-mouse-location-in-canvas\n",
- "mpl.findpos = function(e) {\n",
- " //this section is from http://www.quirksmode.org/js/events_properties.html\n",
- " var targ;\n",
- " if (!e)\n",
- " e = window.event;\n",
- " if (e.target)\n",
- " targ = e.target;\n",
- " else if (e.srcElement)\n",
- " targ = e.srcElement;\n",
- " if (targ.nodeType == 3) // defeat Safari bug\n",
- " targ = targ.parentNode;\n",
- "\n",
- " // jQuery normalizes the pageX and pageY\n",
- " // pageX,Y are the mouse positions relative to the document\n",
- " // offset() returns the position of the element relative to the document\n",
- " var x = e.pageX - $(targ).offset().left;\n",
- " var y = e.pageY - $(targ).offset().top;\n",
- "\n",
- " return {\"x\": x, \"y\": y};\n",
- "};\n",
- "\n",
- "/*\n",
- " * return a copy of an object with only non-object keys\n",
- " * we need this to avoid circular references\n",
- " * http://stackoverflow.com/a/24161582/3208463\n",
- " */\n",
- "function simpleKeys (original) {\n",
- " return Object.keys(original).reduce(function (obj, key) {\n",
- " if (typeof original[key] !== 'object')\n",
- " obj[key] = original[key]\n",
- " return obj;\n",
- " }, {});\n",
- "}\n",
- "\n",
- "mpl.figure.prototype.mouse_event = function(event, name) {\n",
- " var canvas_pos = mpl.findpos(event)\n",
- "\n",
- " if (name === 'button_press')\n",
- " {\n",
- " this.canvas.focus();\n",
- " this.canvas_div.focus();\n",
- " }\n",
- "\n",
- " var x = canvas_pos.x * mpl.ratio;\n",
- " var y = canvas_pos.y * mpl.ratio;\n",
- "\n",
- " this.send_message(name, {x: x, y: y, button: event.button,\n",
- " step: event.step,\n",
- " guiEvent: simpleKeys(event)});\n",
- "\n",
- " /* This prevents the web browser from automatically changing to\n",
- " * the text insertion cursor when the button is pressed. We want\n",
- " * to control all of the cursor setting manually through the\n",
- " * 'cursor' event from matplotlib */\n",
- " event.preventDefault();\n",
- " return false;\n",
- "}\n",
- "\n",
- "mpl.figure.prototype._key_event_extra = function(event, name) {\n",
- " // Handle any extra behaviour associated with a key event\n",
- "}\n",
- "\n",
- "mpl.figure.prototype.key_event = function(event, name) {\n",
- "\n",
- " // Prevent repeat events\n",
- " if (name == 'key_press')\n",
- " {\n",
- " if (event.which === this._key)\n",
- " return;\n",
- " else\n",
- " this._key = event.which;\n",
- " }\n",
- " if (name == 'key_release')\n",
- " this._key = null;\n",
- "\n",
- " var value = '';\n",
- " if (event.ctrlKey && event.which != 17)\n",
- " value += \"ctrl+\";\n",
- " if (event.altKey && event.which != 18)\n",
- " value += \"alt+\";\n",
- " if (event.shiftKey && event.which != 16)\n",
- " value += \"shift+\";\n",
- "\n",
- " value += 'k';\n",
- " value += event.which.toString();\n",
- "\n",
- " this._key_event_extra(event, name);\n",
- "\n",
- " this.send_message(name, {key: value,\n",
- " guiEvent: simpleKeys(event)});\n",
- " return false;\n",
- "}\n",
- "\n",
- "mpl.figure.prototype.toolbar_button_onclick = function(name) {\n",
- " if (name == 'download') {\n",
- " this.handle_save(this, null);\n",
- " } else {\n",
- " this.send_message(\"toolbar_button\", {name: name});\n",
- " }\n",
- "};\n",
- "\n",
- "mpl.figure.prototype.toolbar_button_onmouseover = function(tooltip) {\n",
- " this.message.textContent = tooltip;\n",
- "};\n",
- "mpl.toolbar_items = [[\"Home\", \"Reset original view\", \"fa fa-home icon-home\", \"home\"], [\"Back\", \"Back to previous view\", \"fa fa-arrow-left icon-arrow-left\", \"back\"], [\"Forward\", \"Forward to next view\", \"fa fa-arrow-right icon-arrow-right\", \"forward\"], [\"\", \"\", \"\", \"\"], [\"Pan\", \"Pan axes with left mouse, zoom with right\", \"fa fa-arrows icon-move\", \"pan\"], [\"Zoom\", \"Zoom to rectangle\", \"fa fa-square-o icon-check-empty\", \"zoom\"], [\"\" [...]
- "\n",
- "mpl.extensions = [\"eps\", \"jpeg\", \"pdf\", \"png\", \"ps\", \"raw\", \"svg\", \"tif\"];\n",
- "\n",
- "mpl.default_extension = \"png\";var comm_websocket_adapter = function(comm) {\n",
- " // Create a \"websocket\"-like object which calls the given IPython comm\n",
- " // object with the appropriate methods. Currently this is a non binary\n",
- " // socket, so there is still some room for performance tuning.\n",
- " var ws = {};\n",
- "\n",
- " ws.close = function() {\n",
- " comm.close()\n",
- " };\n",
- " ws.send = function(m) {\n",
- " //console.log('sending', m);\n",
- " comm.send(m);\n",
- " };\n",
- " // Register the callback with on_msg.\n",
- " comm.on_msg(function(msg) {\n",
- " //console.log('receiving', msg['content']['data'], msg);\n",
- " // Pass the mpl event to the overridden (by mpl) onmessage function.\n",
- " ws.onmessage(msg['content']['data'])\n",
- " });\n",
- " return ws;\n",
- "}\n",
- "\n",
- "mpl.mpl_figure_comm = function(comm, msg) {\n",
- " // This is the function which gets called when the mpl process\n",
- " // starts-up an IPython Comm through the \"matplotlib\" channel.\n",
- "\n",
- " var id = msg.content.data.id;\n",
- " // Get hold of the div created by the display call when the Comm\n",
- " // socket was opened in Python.\n",
- " var element = $(\"#\" + id);\n",
- " var ws_proxy = comm_websocket_adapter(comm)\n",
- "\n",
- " function ondownload(figure, format) {\n",
- " window.open(figure.imageObj.src);\n",
- " }\n",
- "\n",
- " var fig = new mpl.figure(id, ws_proxy,\n",
- " ondownload,\n",
- " element.get(0));\n",
- "\n",
- " // Call onopen now - mpl needs it, as it is assuming we've passed it a real\n",
- " // web socket which is closed, not our websocket->open comm proxy.\n",
- " ws_proxy.onopen();\n",
- "\n",
- " fig.parent_element = element.get(0);\n",
- " fig.cell_info = mpl.find_output_cell(\"<div id='\" + id + \"'></div>\");\n",
- " if (!fig.cell_info) {\n",
- " console.error(\"Failed to find cell for figure\", id, fig);\n",
- " return;\n",
- " }\n",
- "\n",
- " var output_index = fig.cell_info[2]\n",
- " var cell = fig.cell_info[0];\n",
- "\n",
- "};\n",
- "\n",
- "mpl.figure.prototype.handle_close = function(fig, msg) {\n",
- " var width = fig.canvas.width/mpl.ratio\n",
- " fig.root.unbind('remove')\n",
- "\n",
- " // Update the output cell to use the data from the current canvas.\n",
- " fig.push_to_output();\n",
- " var dataURL = fig.canvas.toDataURL();\n",
- " // Re-enable the keyboard manager in IPython - without this line, in FF,\n",
- " // the notebook keyboard shortcuts fail.\n",
- " IPython.keyboard_manager.enable()\n",
- " $(fig.parent_element).html('<img src=\"' + dataURL + '\" width=\"' + width + '\">');\n",
- " fig.close_ws(fig, msg);\n",
- "}\n",
- "\n",
- "mpl.figure.prototype.close_ws = function(fig, msg){\n",
- " fig.send_message('closing', msg);\n",
- " // fig.ws.close()\n",
- "}\n",
- "\n",
- "mpl.figure.prototype.push_to_output = function(remove_interactive) {\n",
- " // Turn the data on the canvas into data in the output cell.\n",
- " var width = this.canvas.width/mpl.ratio\n",
- " var dataURL = this.canvas.toDataURL();\n",
- " this.cell_info[1]['text/html'] = '<img src=\"' + dataURL + '\" width=\"' + width + '\">';\n",
- "}\n",
- "\n",
- "mpl.figure.prototype.updated_canvas_event = function() {\n",
- " // Tell IPython that the notebook contents must change.\n",
- " IPython.notebook.set_dirty(true);\n",
- " this.send_message(\"ack\", {});\n",
- " var fig = this;\n",
- " // Wait a second, then push the new image to the DOM so\n",
- " // that it is saved nicely (might be nice to debounce this).\n",
- " setTimeout(function () { fig.push_to_output() }, 1000);\n",
- "}\n",
- "\n",
- "mpl.figure.prototype._init_toolbar = function() {\n",
- " var fig = this;\n",
- "\n",
- " var nav_element = $('<div/>')\n",
- " nav_element.attr('style', 'width: 100%');\n",
- " this.root.append(nav_element);\n",
- "\n",
- " // Define a callback function for later on.\n",
- " function toolbar_event(event) {\n",
- " return fig.toolbar_button_onclick(event['data']);\n",
- " }\n",
- " function toolbar_mouse_event(event) {\n",
- " return fig.toolbar_button_onmouseover(event['data']);\n",
- " }\n",
- "\n",
- " for(var toolbar_ind in mpl.toolbar_items){\n",
- " var name = mpl.toolbar_items[toolbar_ind][0];\n",
- " var tooltip = mpl.toolbar_items[toolbar_ind][1];\n",
- " var image = mpl.toolbar_items[toolbar_ind][2];\n",
- " var method_name = mpl.toolbar_items[toolbar_ind][3];\n",
- "\n",
- " if (!name) { continue; };\n",
- "\n",
- " var button = $('<button class=\"btn btn-default\" href=\"#\" title=\"' + name + '\"><i class=\"fa ' + image + ' fa-lg\"></i></button>');\n",
- " button.click(method_name, toolbar_event);\n",
- " button.mouseover(tooltip, toolbar_mouse_event);\n",
- " nav_element.append(button);\n",
- " }\n",
- "\n",
- " // Add the status bar.\n",
- " var status_bar = $('<span class=\"mpl-message\" style=\"text-align:right; float: right;\"/>');\n",
- " nav_element.append(status_bar);\n",
- " this.message = status_bar[0];\n",
- "\n",
- " // Add the close button to the window.\n",
- " var buttongrp = $('<div class=\"btn-group inline pull-right\"></div>');\n",
- " var button = $('<button class=\"btn btn-mini btn-primary\" href=\"#\" title=\"Stop Interaction\"><i class=\"fa fa-power-off icon-remove icon-large\"></i></button>');\n",
- " button.click(function (evt) { fig.handle_close(fig, {}); } );\n",
- " button.mouseover('Stop Interaction', toolbar_mouse_event);\n",
- " buttongrp.append(button);\n",
- " var titlebar = this.root.find($('.ui-dialog-titlebar'));\n",
- " titlebar.prepend(buttongrp);\n",
- "}\n",
- "\n",
- "mpl.figure.prototype._root_extra_style = function(el){\n",
- " var fig = this\n",
- " el.on(\"remove\", function(){\n",
- "\tfig.close_ws(fig, {});\n",
- " });\n",
- "}\n",
- "\n",
- "mpl.figure.prototype._canvas_extra_style = function(el){\n",
- " // this is important to make the div 'focusable\n",
- " el.attr('tabindex', 0)\n",
- " // reach out to IPython and tell the keyboard manager to turn it's self\n",
- " // off when our div gets focus\n",
- "\n",
- " // location in version 3\n",
- " if (IPython.notebook.keyboard_manager) {\n",
- " IPython.notebook.keyboard_manager.register_events(el);\n",
- " }\n",
- " else {\n",
- " // location in version 2\n",
- " IPython.keyboard_manager.register_events(el);\n",
- " }\n",
- "\n",
- "}\n",
- "\n",
- "mpl.figure.prototype._key_event_extra = function(event, name) {\n",
- " var manager = IPython.notebook.keyboard_manager;\n",
- " if (!manager)\n",
- " manager = IPython.keyboard_manager;\n",
- "\n",
- " // Check for shift+enter\n",
- " if (event.shiftKey && event.which == 13) {\n",
- " this.canvas_div.blur();\n",
- " // select the cell after this one\n",
- " var index = IPython.notebook.find_cell_index(this.cell_info[0]);\n",
- " IPython.notebook.select(index + 1);\n",
- " }\n",
- "}\n",
- "\n",
- "mpl.figure.prototype.handle_save = function(fig, msg) {\n",
- " fig.ondownload(fig, null);\n",
- "}\n",
- "\n",
- "\n",
- "mpl.find_output_cell = function(html_output) {\n",
- " // Return the cell and output element which can be found *uniquely* in the notebook.\n",
- " // Note - this is a bit hacky, but it is done because the \"notebook_saving.Notebook\"\n",
- " // IPython event is triggered only after the cells have been serialised, which for\n",
- " // our purposes (turning an active figure into a static one), is too late.\n",
- " var cells = IPython.notebook.get_cells();\n",
- " var ncells = cells.length;\n",
- " for (var i=0; i<ncells; i++) {\n",
- " var cell = cells[i];\n",
- " if (cell.cell_type === 'code'){\n",
- " for (var j=0; j<cell.output_area.outputs.length; j++) {\n",
- " var data = cell.output_area.outputs[j];\n",
- " if (data.data) {\n",
- " // IPython >= 3 moved mimebundle to data attribute of output\n",
- " data = data.data;\n",
- " }\n",
- " if (data['text/html'] == html_output) {\n",
- " return [cell, data, j];\n",
- " }\n",
- " }\n",
- " }\n",
- " }\n",
- "}\n",
- "\n",
- "// Register the function which deals with the matplotlib target/channel.\n",
- "// The kernel may be null if the page has been refreshed.\n",
- "if (IPython.notebook.kernel != null) {\n",
- " IPython.notebook.kernel.comm_manager.register_target('matplotlib', mpl.mpl_figure_comm);\n",
- "}\n"
- ],
- "text/plain": [
- "<IPython.core.display.Javascript object>"
- ]
- },
- "metadata": {},
- "output_type": "display_data"
- },
- {
- "data": {
- "text/html": [
- "<img src=\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAABDgAAAIcCAYAAAAT/R6VAAAgAElEQVR4XuydB3xV5fnHf/dm700SEhIS9kaGIKBgtaKgqHWv1rrrbJ3VWqvV1r2r/mttRRFXq6gouMGBIEvZKwSSELL3Tu74f37n3pPc3Iw7cm5ykjzv5xMSknPe877f9yTnOb/3GQZIEwJCQAgIASEgBISAEBACQkAICAEhIASEQD8nYOjn45fhCwEhIASEgBAQAkJACAgBISAEhIAQEAJCACJwyE0wWAlYvZj4bwEs9eI8d0+5EcDzAF4AwK972v4H4BwA5wHg13pvEwHssA/yNQCX633AMj4hIASEgBCAPE/7/iYIB1BjH0YCgNK+H5LmIzAC2AwgDsBoAE2dXIHHXADgXAAzAZAF78+jADYCeAfAR/bvaT5AHXToaEd1N5x1AObpYLz9YQjPAfg [...]
- ],
- "text/plain": [
- "<IPython.core.display.HTML object>"
- ]
- },
- "metadata": {},
- "output_type": "display_data"
- },
- {
- "data": {
- "text/plain": [
- "<matplotlib.legend.Legend at 0x15699d090>"
- ]
- },
- "execution_count": 8,
- "metadata": {},
- "output_type": "execute_result"
- },
- {
- "data": {
- "text/plain": [
- "Text(0.5,21,'Iteration')"
- ]
- },
- "execution_count": 8,
- "metadata": {},
- "output_type": "execute_result"
- },
- {
- "data": {
- "text/plain": [
- "Text(0.5,1,'Training Accuracy')"
- ]
- },
- "execution_count": 8,
- "metadata": {},
- "output_type": "execute_result"
- },
- {
- "data": {
- "text/plain": [
- "Text(0.5,21,'Iteration')"
- ]
- },
- "execution_count": 8,
- "metadata": {},
- "output_type": "execute_result"
- },
- {
- "data": {
- "text/plain": [
- "Text(0.5,1,'Training Loss (Cross Entropy)')"
- ]
- },
- "execution_count": 8,
- "metadata": {},
- "output_type": "execute_result"
- },
- {
- "name": "stdout",
- "output_type": "stream",
- "text": [
- " * postgresql://gpadmin@localhost:8000/cifar_places\n",
- "1 rows affected.\n"
- ]
- },
- {
- "data": {
- "text/plain": [
- "[<matplotlib.lines.Line2D at 0x156b1c4d0>]"
- ]
- },
- "execution_count": 8,
- "metadata": {},
- "output_type": "execute_result"
- },
- {
- "data": {
- "text/plain": [
- "[<matplotlib.lines.Line2D at 0x156b583d0>]"
- ]
- },
- "execution_count": 8,
- "metadata": {},
- "output_type": "execute_result"
- },
- {
- "name": "stdout",
- "output_type": "stream",
- "text": [
- " * postgresql://gpadmin@localhost:8000/cifar_places\n",
- "1 rows affected.\n"
- ]
- },
- {
- "data": {
- "text/plain": [
- "[<matplotlib.lines.Line2D at 0x156b58b50>]"
- ]
- },
- "execution_count": 8,
- "metadata": {},
- "output_type": "execute_result"
- },
- {
- "data": {
- "text/plain": [
- "[<matplotlib.lines.Line2D at 0x156b4c610>]"
- ]
- },
- "execution_count": 8,
- "metadata": {},
- "output_type": "execute_result"
- },
- {
- "name": "stdout",
- "output_type": "stream",
- "text": [
- " * postgresql://gpadmin@localhost:8000/cifar_places\n",
- "1 rows affected.\n"
- ]
- },
- {
- "data": {
- "text/plain": [
- "[<matplotlib.lines.Line2D at 0x156b3f510>]"
- ]
- },
- "execution_count": 8,
- "metadata": {},
- "output_type": "execute_result"
- },
- {
- "data": {
- "text/plain": [
- "[<matplotlib.lines.Line2D at 0x156b3f6d0>]"
- ]
- },
- "execution_count": 8,
- "metadata": {},
- "output_type": "execute_result"
- },
- {
- "name": "stdout",
- "output_type": "stream",
- "text": [
- " * postgresql://gpadmin@localhost:8000/cifar_places\n",
- "1 rows affected.\n"
- ]
- },
- {
- "data": {
- "text/plain": [
- "[<matplotlib.lines.Line2D at 0x156b6d090>]"
- ]
- },
- "execution_count": 8,
- "metadata": {},
- "output_type": "execute_result"
- },
- {
- "data": {
- "text/plain": [
- "[<matplotlib.lines.Line2D at 0x156b6d290>]"
- ]
- },
- "execution_count": 8,
- "metadata": {},
- "output_type": "execute_result"
- },
- {
- "name": "stdout",
- "output_type": "stream",
- "text": [
- " * postgresql://gpadmin@localhost:8000/cifar_places\n",
- "1 rows affected.\n"
- ]
- },
- {
- "data": {
- "text/plain": [
- "[<matplotlib.lines.Line2D at 0x156b6d990>]"
- ]
- },
- "execution_count": 8,
- "metadata": {},
- "output_type": "execute_result"
- },
- {
- "data": {
- "text/plain": [
- "[<matplotlib.lines.Line2D at 0x156b6da90>]"
- ]
- },
- "execution_count": 8,
- "metadata": {},
- "output_type": "execute_result"
- },
- {
- "name": "stdout",
- "output_type": "stream",
- "text": [
- " * postgresql://gpadmin@localhost:8000/cifar_places\n",
- "1 rows affected.\n"
- ]
- },
- {
- "data": {
- "text/plain": [
- "[<matplotlib.lines.Line2D at 0x156b7a210>]"
- ]
- },
- "execution_count": 8,
- "metadata": {},
- "output_type": "execute_result"
- },
- {
- "data": {
- "text/plain": [
- "[<matplotlib.lines.Line2D at 0x156b7a350>]"
- ]
- },
- "execution_count": 8,
- "metadata": {},
- "output_type": "execute_result"
- },
- {
- "name": "stdout",
- "output_type": "stream",
- "text": [
- " * postgresql://gpadmin@localhost:8000/cifar_places\n",
- "1 rows affected.\n"
- ]
- },
- {
- "data": {
- "text/plain": [
- "[<matplotlib.lines.Line2D at 0x156b3f090>]"
- ]
- },
- "execution_count": 8,
- "metadata": {},
- "output_type": "execute_result"
- },
- {
- "data": {
- "text/plain": [
- "[<matplotlib.lines.Line2D at 0x156b7a690>]"
- ]
- },
- "execution_count": 8,
- "metadata": {},
- "output_type": "execute_result"
- },
- {
- "name": "stdout",
- "output_type": "stream",
- "text": [
- " * postgresql://gpadmin@localhost:8000/cifar_places\n",
- "1 rows affected.\n"
- ]
- },
- {
- "data": {
- "text/plain": [
- "[<matplotlib.lines.Line2D at 0x156b86050>]"
- ]
- },
- "execution_count": 8,
- "metadata": {},
- "output_type": "execute_result"
- },
- {
- "data": {
- "text/plain": [
- "[<matplotlib.lines.Line2D at 0x156b86110>]"
- ]
- },
- "execution_count": 8,
- "metadata": {},
- "output_type": "execute_result"
- },
- {
- "name": "stdout",
- "output_type": "stream",
- "text": [
- " * postgresql://gpadmin@localhost:8000/cifar_places\n",
- "1 rows affected.\n"
- ]
- },
- {
- "data": {
- "text/plain": [
- "[<matplotlib.lines.Line2D at 0x156b868d0>]"
- ]
- },
- "execution_count": 8,
- "metadata": {},
- "output_type": "execute_result"
- },
- {
- "data": {
- "text/plain": [
- "[<matplotlib.lines.Line2D at 0x156b86990>]"
- ]
- },
- "execution_count": 8,
- "metadata": {},
- "output_type": "execute_result"
- },
- {
- "name": "stdout",
- "output_type": "stream",
- "text": [
- " * postgresql://gpadmin@localhost:8000/cifar_places\n",
- "1 rows affected.\n"
- ]
- },
- {
- "data": {
- "text/plain": [
- "[<matplotlib.lines.Line2D at 0x156b90190>]"
- ]
- },
- "execution_count": 8,
- "metadata": {},
- "output_type": "execute_result"
- },
- {
- "data": {
- "text/plain": [
- "[<matplotlib.lines.Line2D at 0x156b90250>]"
- ]
- },
- "execution_count": 8,
- "metadata": {},
- "output_type": "execute_result"
- },
- {
- "name": "stdout",
- "output_type": "stream",
- "text": [
- " * postgresql://gpadmin@localhost:8000/cifar_places\n",
- "1 rows affected.\n"
- ]
- },
- {
- "data": {
- "text/plain": [
- "[<matplotlib.lines.Line2D at 0x156b7af90>]"
- ]
- },
- "execution_count": 8,
- "metadata": {},
- "output_type": "execute_result"
- },
- {
- "data": {
- "text/plain": [
- "[<matplotlib.lines.Line2D at 0x156b3f310>]"
- ]
- },
- "execution_count": 8,
- "metadata": {},
- "output_type": "execute_result"
- },
- {
- "name": "stdout",
- "output_type": "stream",
- "text": [
- " * postgresql://gpadmin@localhost:8000/cifar_places\n",
- "1 rows affected.\n"
- ]
- },
- {
- "data": {
- "text/plain": [
- "[<matplotlib.lines.Line2D at 0x156b90a90>]"
- ]
- },
- "execution_count": 8,
- "metadata": {},
- "output_type": "execute_result"
- },
- {
- "data": {
- "text/plain": [
- "[<matplotlib.lines.Line2D at 0x156b90f50>]"
- ]
- },
- "execution_count": 8,
- "metadata": {},
- "output_type": "execute_result"
- },
- {
- "name": "stdout",
- "output_type": "stream",
- "text": [
- " * postgresql://gpadmin@localhost:8000/cifar_places\n",
- "1 rows affected.\n"
- ]
- },
- {
- "data": {
- "text/plain": [
- "[<matplotlib.lines.Line2D at 0x156b9d610>]"
- ]
- },
- "execution_count": 8,
- "metadata": {},
- "output_type": "execute_result"
- },
- {
- "data": {
- "text/plain": [
- "[<matplotlib.lines.Line2D at 0x156b9d890>]"
- ]
- },
- "execution_count": 8,
- "metadata": {},
- "output_type": "execute_result"
- },
- {
- "name": "stdout",
- "output_type": "stream",
- "text": [
- " * postgresql://gpadmin@localhost:8000/cifar_places\n",
- "1 rows affected.\n"
- ]
- },
- {
- "data": {
- "text/plain": [
- "[<matplotlib.lines.Line2D at 0x156bac090>]"
- ]
- },
- "execution_count": 8,
- "metadata": {},
- "output_type": "execute_result"
- },
- {
- "data": {
- "text/plain": [
- "[<matplotlib.lines.Line2D at 0x156bac150>]"
- ]
- },
- "execution_count": 8,
- "metadata": {},
- "output_type": "execute_result"
- },
- {
- "name": "stdout",
- "output_type": "stream",
- "text": [
- " * postgresql://gpadmin@localhost:8000/cifar_places\n",
- "1 rows affected.\n"
- ]
- },
- {
- "data": {
- "text/plain": [
- "[<matplotlib.lines.Line2D at 0x156b9d5d0>]"
- ]
- },
- "execution_count": 8,
- "metadata": {},
- "output_type": "execute_result"
- },
- {
- "data": {
- "text/plain": [
- "[<matplotlib.lines.Line2D at 0x156b90ed0>]"
- ]
- },
- "execution_count": 8,
- "metadata": {},
- "output_type": "execute_result"
- },
- {
- "name": "stdout",
- "output_type": "stream",
- "text": [
- " * postgresql://gpadmin@localhost:8000/cifar_places\n",
- "1 rows affected.\n"
- ]
- },
- {
- "data": {
- "text/plain": [
- "[<matplotlib.lines.Line2D at 0x156baca50>]"
- ]
- },
- "execution_count": 8,
- "metadata": {},
- "output_type": "execute_result"
- },
- {
- "data": {
- "text/plain": [
- "[<matplotlib.lines.Line2D at 0x156bacb50>]"
- ]
- },
- "execution_count": 8,
- "metadata": {},
- "output_type": "execute_result"
- },
- {
- "data": {
- "text/plain": [
- "<matplotlib.legend.Legend at 0x156abfc90>"
- ]
- },
- "execution_count": 8,
- "metadata": {},
- "output_type": "execute_result"
- }
- ],
- "source": [
- "df_results = %sql SELECT * FROM cifar10_multi_model_info ORDER BY training_loss_final ASC LIMIT 100;\n",
- "df_results = df_results.DataFrame()\n",
- "\n",
- "df_summary = %sql SELECT * FROM cifar10_multi_model_summary;\n",
- "df_summary = df_summary.DataFrame()\n",
- "\n",
- "#set up plots\n",
- "fig, axs = plt.subplots(nrows=1, ncols=2, figsize=(10,5))\n",
- "fig.legend(ncol=4)\n",
- "fig.tight_layout()\n",
- "\n",
- "ax_metric = axs[0]\n",
- "ax_loss = axs[1]\n",
- "\n",
- "ax_metric.xaxis.set_major_locator(MaxNLocator(integer=True))\n",
- "ax_metric.set_xlabel('Iteration')\n",
- "#ax_metric.set_ylabel('Accuracy')\n",
- "ax_metric.set_title('Training Accuracy')\n",
- "\n",
- "ax_loss.xaxis.set_major_locator(MaxNLocator(integer=True))\n",
- "ax_loss.set_xlabel('Iteration')\n",
- "#ax_loss.set_ylabel('Cross Entropy Loss')\n",
- "ax_loss.set_title('Training Loss (Cross Entropy)')\n",
- "\n",
- "iters = df_summary['metrics_iters'][0]\n",
- "\n",
- "for mst_key in df_results['mst_key']:\n",
- " df_output_info = %sql SELECT training_metrics,training_loss FROM cifar10_multi_model_info WHERE mst_key = $mst_key\n",
- " df_output_info = df_output_info.DataFrame()\n",
- " training_metrics = df_output_info['training_metrics'][0]\n",
- " training_loss = df_output_info['training_loss'][0]\n",
- " \n",
- " ax_metric.plot(iters, training_metrics, label=mst_key, marker='o')\n",
- " df_results = %sql SELECT * FROM cifar10_multi_model_info ORDER BY training_loss_final ASC LIMIT 100;\n",
- "df_results = df_results.DataFrame()\n",
- "\n",
- "df_summary = %sql SELECT * FROM cifar10_multi_model_summary;\n",
- "df_summary = df_summary.DataFrame()\n",
- "\n",
- "#set up plots\n",
- "fig, axs = plt.subplots(nrows=1, ncols=2, figsize=(10,5))\n",
- "fig.legend(ncol=4)\n",
- "fig.tight_layout()\n",
- "\n",
- "ax_metric = axs[0]\n",
- "ax_loss = axs[1]\n",
- "\n",
- "ax_metric.xaxis.set_major_locator(MaxNLocator(integer=True))\n",
- "ax_metric.set_xlabel('Iteration')\n",
- "#ax_metric.set_ylabel('Accuracy')\n",
- "ax_metric.set_title('Training Accuracy')\n",
- "\n",
- "ax_loss.xaxis.set_major_locator(MaxNLocator(integer=True))\n",
- "ax_loss.set_xlabel('Iteration')\n",
- "#ax_loss.set_ylabel('Cross Entropy Loss')\n",
- "ax_loss.set_title('Training Loss (Cross Entropy)')\n",
- "\n",
- "iters = df_summary['metrics_iters'][0]\n",
- "\n",
- "for mst_key in df_results['mst_key']:\n",
- " df_output_info = %sql SELECT training_metrics,training_loss FROM cifar10_multi_model_info WHERE mst_key = $mst_key\n",
- " df_output_info = df_output_info.DataFrame()\n",
- " training_metrics = df_output_info['training_metrics'][0]\n",
- " training_loss = df_output_info['training_loss'][0]\n",
- " \n",
- " #ax_metric.plot(iters, training_metrics, label=mst_key, marker='o')\n",
- " ax_metric.plot(iters, training_metrics)\n",
- " \n",
- " #ax_loss.plot(iters, training_loss, label=mst_key, marker='o')\n",
- " ax_loss.plot(iters, training_loss)\n",
- "\n",
- "plt.legend()\n",
- "# fig.savefig('./lc_keras_fit.png', dpi = 300)"
- ]
- },
- {
- "cell_type": "markdown",
- "metadata": {},
- "source": [
- "Validation data"
- ]
- },
- {
- "cell_type": "code",
- "execution_count": 9,
- "metadata": {
- "scrolled": false
- },
- "outputs": [
- {
- "name": "stdout",
- "output_type": "stream",
- "text": [
- " * postgresql://gpadmin@localhost:8000/cifar_places\n",
- "16 rows affected.\n",
- " * postgresql://gpadmin@localhost:8000/cifar_places\n",
- "1 rows affected.\n"
- ]
- },
- {
- "data": {
- "application/javascript": [
- "/* Put everything inside the global mpl namespace */\n",
- "window.mpl = {};\n",
- "\n",
- "\n",
- "mpl.get_websocket_type = function() {\n",
- " if (typeof(WebSocket) !== 'undefined') {\n",
- " return WebSocket;\n",
- " } else if (typeof(MozWebSocket) !== 'undefined') {\n",
- " return MozWebSocket;\n",
- " } else {\n",
- " alert('Your browser does not have WebSocket support.' +\n",
- " 'Please try Chrome, Safari or Firefox ≥ 6. ' +\n",
- " 'Firefox 4 and 5 are also supported but you ' +\n",
- " 'have to enable WebSockets in about:config.');\n",
- " };\n",
- "}\n",
- "\n",
- "mpl.figure = function(figure_id, websocket, ondownload, parent_element) {\n",
- " this.id = figure_id;\n",
- "\n",
- " this.ws = websocket;\n",
- "\n",
- " this.supports_binary = (this.ws.binaryType != undefined);\n",
- "\n",
- " if (!this.supports_binary) {\n",
- " var warnings = document.getElementById(\"mpl-warnings\");\n",
- " if (warnings) {\n",
- " warnings.style.display = 'block';\n",
- " warnings.textContent = (\n",
- " \"This browser does not support binary websocket messages. \" +\n",
- " \"Performance may be slow.\");\n",
- " }\n",
- " }\n",
- "\n",
- " this.imageObj = new Image();\n",
- "\n",
- " this.context = undefined;\n",
- " this.message = undefined;\n",
- " this.canvas = undefined;\n",
- " this.rubberband_canvas = undefined;\n",
- " this.rubberband_context = undefined;\n",
- " this.format_dropdown = undefined;\n",
- "\n",
- " this.image_mode = 'full';\n",
- "\n",
- " this.root = $('<div/>');\n",
- " this._root_extra_style(this.root)\n",
- " this.root.attr('style', 'display: inline-block');\n",
- "\n",
- " $(parent_element).append(this.root);\n",
- "\n",
- " this._init_header(this);\n",
- " this._init_canvas(this);\n",
- " this._init_toolbar(this);\n",
- "\n",
- " var fig = this;\n",
- "\n",
- " this.waiting = false;\n",
- "\n",
- " this.ws.onopen = function () {\n",
- " fig.send_message(\"supports_binary\", {value: fig.supports_binary});\n",
- " fig.send_message(\"send_image_mode\", {});\n",
- " if (mpl.ratio != 1) {\n",
- " fig.send_message(\"set_dpi_ratio\", {'dpi_ratio': mpl.ratio});\n",
- " }\n",
- " fig.send_message(\"refresh\", {});\n",
- " }\n",
- "\n",
- " this.imageObj.onload = function() {\n",
- " if (fig.image_mode == 'full') {\n",
- " // Full images could contain transparency (where diff images\n",
- " // almost always do), so we need to clear the canvas so that\n",
- " // there is no ghosting.\n",
- " fig.context.clearRect(0, 0, fig.canvas.width, fig.canvas.height);\n",
- " }\n",
- " fig.context.drawImage(fig.imageObj, 0, 0);\n",
- " };\n",
- "\n",
- " this.imageObj.onunload = function() {\n",
- " fig.ws.close();\n",
- " }\n",
- "\n",
- " this.ws.onmessage = this._make_on_message_function(this);\n",
- "\n",
- " this.ondownload = ondownload;\n",
- "}\n",
- "\n",
- "mpl.figure.prototype._init_header = function() {\n",
- " var titlebar = $(\n",
- " '<div class=\"ui-dialog-titlebar ui-widget-header ui-corner-all ' +\n",
- " 'ui-helper-clearfix\"/>');\n",
- " var titletext = $(\n",
- " '<div class=\"ui-dialog-title\" style=\"width: 100%; ' +\n",
- " 'text-align: center; padding: 3px;\"/>');\n",
- " titlebar.append(titletext)\n",
- " this.root.append(titlebar);\n",
- " this.header = titletext[0];\n",
- "}\n",
- "\n",
- "\n",
- "\n",
- "mpl.figure.prototype._canvas_extra_style = function(canvas_div) {\n",
- "\n",
- "}\n",
- "\n",
- "\n",
- "mpl.figure.prototype._root_extra_style = function(canvas_div) {\n",
- "\n",
- "}\n",
- "\n",
- "mpl.figure.prototype._init_canvas = function() {\n",
- " var fig = this;\n",
- "\n",
- " var canvas_div = $('<div/>');\n",
- "\n",
- " canvas_div.attr('style', 'position: relative; clear: both; outline: 0');\n",
- "\n",
- " function canvas_keyboard_event(event) {\n",
- " return fig.key_event(event, event['data']);\n",
- " }\n",
- "\n",
- " canvas_div.keydown('key_press', canvas_keyboard_event);\n",
- " canvas_div.keyup('key_release', canvas_keyboard_event);\n",
- " this.canvas_div = canvas_div\n",
- " this._canvas_extra_style(canvas_div)\n",
- " this.root.append(canvas_div);\n",
- "\n",
- " var canvas = $('<canvas/>');\n",
- " canvas.addClass('mpl-canvas');\n",
- " canvas.attr('style', \"left: 0; top: 0; z-index: 0; outline: 0\")\n",
- "\n",
- " this.canvas = canvas[0];\n",
- " this.context = canvas[0].getContext(\"2d\");\n",
- "\n",
- " var backingStore = this.context.backingStorePixelRatio ||\n",
- "\tthis.context.webkitBackingStorePixelRatio ||\n",
- "\tthis.context.mozBackingStorePixelRatio ||\n",
- "\tthis.context.msBackingStorePixelRatio ||\n",
- "\tthis.context.oBackingStorePixelRatio ||\n",
- "\tthis.context.backingStorePixelRatio || 1;\n",
- "\n",
- " mpl.ratio = (window.devicePixelRatio || 1) / backingStore;\n",
- "\n",
- " var rubberband = $('<canvas/>');\n",
- " rubberband.attr('style', \"position: absolute; left: 0; top: 0; z-index: 1;\")\n",
- "\n",
- " var pass_mouse_events = true;\n",
- "\n",
- " canvas_div.resizable({\n",
- " start: function(event, ui) {\n",
- " pass_mouse_events = false;\n",
- " },\n",
- " resize: function(event, ui) {\n",
- " fig.request_resize(ui.size.width, ui.size.height);\n",
- " },\n",
- " stop: function(event, ui) {\n",
- " pass_mouse_events = true;\n",
- " fig.request_resize(ui.size.width, ui.size.height);\n",
- " },\n",
- " });\n",
- "\n",
- " function mouse_event_fn(event) {\n",
- " if (pass_mouse_events)\n",
- " return fig.mouse_event(event, event['data']);\n",
- " }\n",
- "\n",
- " rubberband.mousedown('button_press', mouse_event_fn);\n",
- " rubberband.mouseup('button_release', mouse_event_fn);\n",
- " // Throttle sequential mouse events to 1 every 20ms.\n",
- " rubberband.mousemove('motion_notify', mouse_event_fn);\n",
- "\n",
- " rubberband.mouseenter('figure_enter', mouse_event_fn);\n",
- " rubberband.mouseleave('figure_leave', mouse_event_fn);\n",
- "\n",
- " canvas_div.on(\"wheel\", function (event) {\n",
- " event = event.originalEvent;\n",
- " event['data'] = 'scroll'\n",
- " if (event.deltaY < 0) {\n",
- " event.step = 1;\n",
- " } else {\n",
- " event.step = -1;\n",
- " }\n",
- " mouse_event_fn(event);\n",
- " });\n",
- "\n",
- " canvas_div.append(canvas);\n",
- " canvas_div.append(rubberband);\n",
- "\n",
- " this.rubberband = rubberband;\n",
- " this.rubberband_canvas = rubberband[0];\n",
- " this.rubberband_context = rubberband[0].getContext(\"2d\");\n",
- " this.rubberband_context.strokeStyle = \"#000000\";\n",
- "\n",
- " this._resize_canvas = function(width, height) {\n",
- " // Keep the size of the canvas, canvas container, and rubber band\n",
- " // canvas in synch.\n",
- " canvas_div.css('width', width)\n",
- " canvas_div.css('height', height)\n",
- "\n",
- " canvas.attr('width', width * mpl.ratio);\n",
- " canvas.attr('height', height * mpl.ratio);\n",
- " canvas.attr('style', 'width: ' + width + 'px; height: ' + height + 'px;');\n",
- "\n",
- " rubberband.attr('width', width);\n",
- " rubberband.attr('height', height);\n",
- " }\n",
- "\n",
- " // Set the figure to an initial 600x600px, this will subsequently be updated\n",
- " // upon first draw.\n",
- " this._resize_canvas(600, 600);\n",
- "\n",
- " // Disable right mouse context menu.\n",
- " $(this.rubberband_canvas).bind(\"contextmenu\",function(e){\n",
- " return false;\n",
- " });\n",
- "\n",
- " function set_focus () {\n",
- " canvas.focus();\n",
- " canvas_div.focus();\n",
- " }\n",
- "\n",
- " window.setTimeout(set_focus, 100);\n",
- "}\n",
- "\n",
- "mpl.figure.prototype._init_toolbar = function() {\n",
- " var fig = this;\n",
- "\n",
- " var nav_element = $('<div/>')\n",
- " nav_element.attr('style', 'width: 100%');\n",
- " this.root.append(nav_element);\n",
- "\n",
- " // Define a callback function for later on.\n",
- " function toolbar_event(event) {\n",
- " return fig.toolbar_button_onclick(event['data']);\n",
- " }\n",
- " function toolbar_mouse_event(event) {\n",
- " return fig.toolbar_button_onmouseover(event['data']);\n",
- " }\n",
- "\n",
- " for(var toolbar_ind in mpl.toolbar_items) {\n",
- " var name = mpl.toolbar_items[toolbar_ind][0];\n",
- " var tooltip = mpl.toolbar_items[toolbar_ind][1];\n",
- " var image = mpl.toolbar_items[toolbar_ind][2];\n",
- " var method_name = mpl.toolbar_items[toolbar_ind][3];\n",
- "\n",
- " if (!name) {\n",
- " // put a spacer in here.\n",
- " continue;\n",
- " }\n",
- " var button = $('<button/>');\n",
- " button.addClass('ui-button ui-widget ui-state-default ui-corner-all ' +\n",
- " 'ui-button-icon-only');\n",
- " button.attr('role', 'button');\n",
- " button.attr('aria-disabled', 'false');\n",
- " button.click(method_name, toolbar_event);\n",
- " button.mouseover(tooltip, toolbar_mouse_event);\n",
- "\n",
- " var icon_img = $('<span/>');\n",
- " icon_img.addClass('ui-button-icon-primary ui-icon');\n",
- " icon_img.addClass(image);\n",
- " icon_img.addClass('ui-corner-all');\n",
- "\n",
- " var tooltip_span = $('<span/>');\n",
- " tooltip_span.addClass('ui-button-text');\n",
- " tooltip_span.html(tooltip);\n",
- "\n",
- " button.append(icon_img);\n",
- " button.append(tooltip_span);\n",
- "\n",
- " nav_element.append(button);\n",
- " }\n",
- "\n",
- " var fmt_picker_span = $('<span/>');\n",
- "\n",
- " var fmt_picker = $('<select/>');\n",
- " fmt_picker.addClass('mpl-toolbar-option ui-widget ui-widget-content');\n",
- " fmt_picker_span.append(fmt_picker);\n",
- " nav_element.append(fmt_picker_span);\n",
- " this.format_dropdown = fmt_picker[0];\n",
- "\n",
- " for (var ind in mpl.extensions) {\n",
- " var fmt = mpl.extensions[ind];\n",
- " var option = $(\n",
- " '<option/>', {selected: fmt === mpl.default_extension}).html(fmt);\n",
- " fmt_picker.append(option)\n",
- " }\n",
- "\n",
- " // Add hover states to the ui-buttons\n",
- " $( \".ui-button\" ).hover(\n",
- " function() { $(this).addClass(\"ui-state-hover\");},\n",
- " function() { $(this).removeClass(\"ui-state-hover\");}\n",
- " );\n",
- "\n",
- " var status_bar = $('<span class=\"mpl-message\"/>');\n",
- " nav_element.append(status_bar);\n",
- " this.message = status_bar[0];\n",
- "}\n",
- "\n",
- "mpl.figure.prototype.request_resize = function(x_pixels, y_pixels) {\n",
- " // Request matplotlib to resize the figure. Matplotlib will then trigger a resize in the client,\n",
- " // which will in turn request a refresh of the image.\n",
- " this.send_message('resize', {'width': x_pixels, 'height': y_pixels});\n",
- "}\n",
- "\n",
- "mpl.figure.prototype.send_message = function(type, properties) {\n",
- " properties['type'] = type;\n",
- " properties['figure_id'] = this.id;\n",
- " this.ws.send(JSON.stringify(properties));\n",
- "}\n",
- "\n",
- "mpl.figure.prototype.send_draw_message = function() {\n",
- " if (!this.waiting) {\n",
- " this.waiting = true;\n",
- " this.ws.send(JSON.stringify({type: \"draw\", figure_id: this.id}));\n",
- " }\n",
- "}\n",
- "\n",
- "\n",
- "mpl.figure.prototype.handle_save = function(fig, msg) {\n",
- " var format_dropdown = fig.format_dropdown;\n",
- " var format = format_dropdown.options[format_dropdown.selectedIndex].value;\n",
- " fig.ondownload(fig, format);\n",
- "}\n",
- "\n",
- "\n",
- "mpl.figure.prototype.handle_resize = function(fig, msg) {\n",
- " var size = msg['size'];\n",
- " if (size[0] != fig.canvas.width || size[1] != fig.canvas.height) {\n",
- " fig._resize_canvas(size[0], size[1]);\n",
- " fig.send_message(\"refresh\", {});\n",
- " };\n",
- "}\n",
- "\n",
- "mpl.figure.prototype.handle_rubberband = function(fig, msg) {\n",
- " var x0 = msg['x0'] / mpl.ratio;\n",
- " var y0 = (fig.canvas.height - msg['y0']) / mpl.ratio;\n",
- " var x1 = msg['x1'] / mpl.ratio;\n",
- " var y1 = (fig.canvas.height - msg['y1']) / mpl.ratio;\n",
- " x0 = Math.floor(x0) + 0.5;\n",
- " y0 = Math.floor(y0) + 0.5;\n",
- " x1 = Math.floor(x1) + 0.5;\n",
- " y1 = Math.floor(y1) + 0.5;\n",
- " var min_x = Math.min(x0, x1);\n",
- " var min_y = Math.min(y0, y1);\n",
- " var width = Math.abs(x1 - x0);\n",
- " var height = Math.abs(y1 - y0);\n",
- "\n",
- " fig.rubberband_context.clearRect(\n",
- " 0, 0, fig.canvas.width, fig.canvas.height);\n",
- "\n",
- " fig.rubberband_context.strokeRect(min_x, min_y, width, height);\n",
- "}\n",
- "\n",
- "mpl.figure.prototype.handle_figure_label = function(fig, msg) {\n",
- " // Updates the figure title.\n",
- " fig.header.textContent = msg['label'];\n",
- "}\n",
- "\n",
- "mpl.figure.prototype.handle_cursor = function(fig, msg) {\n",
- " var cursor = msg['cursor'];\n",
- " switch(cursor)\n",
- " {\n",
- " case 0:\n",
- " cursor = 'pointer';\n",
- " break;\n",
- " case 1:\n",
- " cursor = 'default';\n",
- " break;\n",
- " case 2:\n",
- " cursor = 'crosshair';\n",
- " break;\n",
- " case 3:\n",
- " cursor = 'move';\n",
- " break;\n",
- " }\n",
- " fig.rubberband_canvas.style.cursor = cursor;\n",
- "}\n",
- "\n",
- "mpl.figure.prototype.handle_message = function(fig, msg) {\n",
- " fig.message.textContent = msg['message'];\n",
- "}\n",
- "\n",
- "mpl.figure.prototype.handle_draw = function(fig, msg) {\n",
- " // Request the server to send over a new figure.\n",
- " fig.send_draw_message();\n",
- "}\n",
- "\n",
- "mpl.figure.prototype.handle_image_mode = function(fig, msg) {\n",
- " fig.image_mode = msg['mode'];\n",
- "}\n",
- "\n",
- "mpl.figure.prototype.updated_canvas_event = function() {\n",
- " // Called whenever the canvas gets updated.\n",
- " this.send_message(\"ack\", {});\n",
- "}\n",
- "\n",
- "// A function to construct a web socket function for onmessage handling.\n",
- "// Called in the figure constructor.\n",
- "mpl.figure.prototype._make_on_message_function = function(fig) {\n",
- " return function socket_on_message(evt) {\n",
- " if (evt.data instanceof Blob) {\n",
- " /* FIXME: We get \"Resource interpreted as Image but\n",
- " * transferred with MIME type text/plain:\" errors on\n",
- " * Chrome. But how to set the MIME type? It doesn't seem\n",
- " * to be part of the websocket stream */\n",
- " evt.data.type = \"image/png\";\n",
- "\n",
- " /* Free the memory for the previous frames */\n",
- " if (fig.imageObj.src) {\n",
- " (window.URL || window.webkitURL).revokeObjectURL(\n",
- " fig.imageObj.src);\n",
- " }\n",
- "\n",
- " fig.imageObj.src = (window.URL || window.webkitURL).createObjectURL(\n",
- " evt.data);\n",
- " fig.updated_canvas_event();\n",
- " fig.waiting = false;\n",
- " return;\n",
- " }\n",
- " else if (typeof evt.data === 'string' && evt.data.slice(0, 21) == \"data:image/png;base64\") {\n",
- " fig.imageObj.src = evt.data;\n",
- " fig.updated_canvas_event();\n",
- " fig.waiting = false;\n",
- " return;\n",
- " }\n",
- "\n",
- " var msg = JSON.parse(evt.data);\n",
- " var msg_type = msg['type'];\n",
- "\n",
- " // Call the \"handle_{type}\" callback, which takes\n",
- " // the figure and JSON message as its only arguments.\n",
- " try {\n",
- " var callback = fig[\"handle_\" + msg_type];\n",
- " } catch (e) {\n",
- " console.log(\"No handler for the '\" + msg_type + \"' message type: \", msg);\n",
- " return;\n",
- " }\n",
- "\n",
- " if (callback) {\n",
- " try {\n",
- " // console.log(\"Handling '\" + msg_type + \"' message: \", msg);\n",
- " callback(fig, msg);\n",
- " } catch (e) {\n",
- " console.log(\"Exception inside the 'handler_\" + msg_type + \"' callback:\", e, e.stack, msg);\n",
- " }\n",
- " }\n",
- " };\n",
- "}\n",
- "\n",
- "// from http://stackoverflow.com/questions/1114465/getting-mouse-location-in-canvas\n",
- "mpl.findpos = function(e) {\n",
- " //this section is from http://www.quirksmode.org/js/events_properties.html\n",
- " var targ;\n",
- " if (!e)\n",
- " e = window.event;\n",
- " if (e.target)\n",
- " targ = e.target;\n",
- " else if (e.srcElement)\n",
- " targ = e.srcElement;\n",
- " if (targ.nodeType == 3) // defeat Safari bug\n",
- " targ = targ.parentNode;\n",
- "\n",
- " // jQuery normalizes the pageX and pageY\n",
- " // pageX,Y are the mouse positions relative to the document\n",
- " // offset() returns the position of the element relative to the document\n",
- " var x = e.pageX - $(targ).offset().left;\n",
- " var y = e.pageY - $(targ).offset().top;\n",
- "\n",
- " return {\"x\": x, \"y\": y};\n",
- "};\n",
- "\n",
- "/*\n",
- " * return a copy of an object with only non-object keys\n",
- " * we need this to avoid circular references\n",
- " * http://stackoverflow.com/a/24161582/3208463\n",
- " */\n",
- "function simpleKeys (original) {\n",
- " return Object.keys(original).reduce(function (obj, key) {\n",
- " if (typeof original[key] !== 'object')\n",
- " obj[key] = original[key]\n",
- " return obj;\n",
- " }, {});\n",
- "}\n",
- "\n",
- "mpl.figure.prototype.mouse_event = function(event, name) {\n",
- " var canvas_pos = mpl.findpos(event)\n",
- "\n",
- " if (name === 'button_press')\n",
- " {\n",
- " this.canvas.focus();\n",
- " this.canvas_div.focus();\n",
- " }\n",
- "\n",
- " var x = canvas_pos.x * mpl.ratio;\n",
- " var y = canvas_pos.y * mpl.ratio;\n",
- "\n",
- " this.send_message(name, {x: x, y: y, button: event.button,\n",
- " step: event.step,\n",
- " guiEvent: simpleKeys(event)});\n",
- "\n",
- " /* This prevents the web browser from automatically changing to\n",
- " * the text insertion cursor when the button is pressed. We want\n",
- " * to control all of the cursor setting manually through the\n",
- " * 'cursor' event from matplotlib */\n",
- " event.preventDefault();\n",
- " return false;\n",
- "}\n",
- "\n",
- "mpl.figure.prototype._key_event_extra = function(event, name) {\n",
- " // Handle any extra behaviour associated with a key event\n",
- "}\n",
- "\n",
- "mpl.figure.prototype.key_event = function(event, name) {\n",
- "\n",
- " // Prevent repeat events\n",
- " if (name == 'key_press')\n",
- " {\n",
- " if (event.which === this._key)\n",
- " return;\n",
- " else\n",
- " this._key = event.which;\n",
- " }\n",
- " if (name == 'key_release')\n",
- " this._key = null;\n",
- "\n",
- " var value = '';\n",
- " if (event.ctrlKey && event.which != 17)\n",
- " value += \"ctrl+\";\n",
- " if (event.altKey && event.which != 18)\n",
- " value += \"alt+\";\n",
- " if (event.shiftKey && event.which != 16)\n",
- " value += \"shift+\";\n",
- "\n",
- " value += 'k';\n",
- " value += event.which.toString();\n",
- "\n",
- " this._key_event_extra(event, name);\n",
- "\n",
- " this.send_message(name, {key: value,\n",
- " guiEvent: simpleKeys(event)});\n",
- " return false;\n",
- "}\n",
- "\n",
- "mpl.figure.prototype.toolbar_button_onclick = function(name) {\n",
- " if (name == 'download') {\n",
- " this.handle_save(this, null);\n",
- " } else {\n",
- " this.send_message(\"toolbar_button\", {name: name});\n",
- " }\n",
- "};\n",
- "\n",
- "mpl.figure.prototype.toolbar_button_onmouseover = function(tooltip) {\n",
- " this.message.textContent = tooltip;\n",
- "};\n",
- "mpl.toolbar_items = [[\"Home\", \"Reset original view\", \"fa fa-home icon-home\", \"home\"], [\"Back\", \"Back to previous view\", \"fa fa-arrow-left icon-arrow-left\", \"back\"], [\"Forward\", \"Forward to next view\", \"fa fa-arrow-right icon-arrow-right\", \"forward\"], [\"\", \"\", \"\", \"\"], [\"Pan\", \"Pan axes with left mouse, zoom with right\", \"fa fa-arrows icon-move\", \"pan\"], [\"Zoom\", \"Zoom to rectangle\", \"fa fa-square-o icon-check-empty\", \"zoom\"], [\"\" [...]
- "\n",
- "mpl.extensions = [\"eps\", \"jpeg\", \"pdf\", \"png\", \"ps\", \"raw\", \"svg\", \"tif\"];\n",
- "\n",
- "mpl.default_extension = \"png\";var comm_websocket_adapter = function(comm) {\n",
- " // Create a \"websocket\"-like object which calls the given IPython comm\n",
- " // object with the appropriate methods. Currently this is a non binary\n",
- " // socket, so there is still some room for performance tuning.\n",
- " var ws = {};\n",
- "\n",
- " ws.close = function() {\n",
- " comm.close()\n",
- " };\n",
- " ws.send = function(m) {\n",
- " //console.log('sending', m);\n",
- " comm.send(m);\n",
- " };\n",
- " // Register the callback with on_msg.\n",
- " comm.on_msg(function(msg) {\n",
- " //console.log('receiving', msg['content']['data'], msg);\n",
- " // Pass the mpl event to the overridden (by mpl) onmessage function.\n",
- " ws.onmessage(msg['content']['data'])\n",
- " });\n",
- " return ws;\n",
- "}\n",
- "\n",
- "mpl.mpl_figure_comm = function(comm, msg) {\n",
- " // This is the function which gets called when the mpl process\n",
- " // starts-up an IPython Comm through the \"matplotlib\" channel.\n",
- "\n",
- " var id = msg.content.data.id;\n",
- " // Get hold of the div created by the display call when the Comm\n",
- " // socket was opened in Python.\n",
- " var element = $(\"#\" + id);\n",
- " var ws_proxy = comm_websocket_adapter(comm)\n",
- "\n",
- " function ondownload(figure, format) {\n",
- " window.open(figure.imageObj.src);\n",
- " }\n",
- "\n",
- " var fig = new mpl.figure(id, ws_proxy,\n",
- " ondownload,\n",
- " element.get(0));\n",
- "\n",
- " // Call onopen now - mpl needs it, as it is assuming we've passed it a real\n",
- " // web socket which is closed, not our websocket->open comm proxy.\n",
- " ws_proxy.onopen();\n",
- "\n",
- " fig.parent_element = element.get(0);\n",
- " fig.cell_info = mpl.find_output_cell(\"<div id='\" + id + \"'></div>\");\n",
- " if (!fig.cell_info) {\n",
- " console.error(\"Failed to find cell for figure\", id, fig);\n",
- " return;\n",
- " }\n",
- "\n",
- " var output_index = fig.cell_info[2]\n",
- " var cell = fig.cell_info[0];\n",
- "\n",
- "};\n",
- "\n",
- "mpl.figure.prototype.handle_close = function(fig, msg) {\n",
- " var width = fig.canvas.width/mpl.ratio\n",
- " fig.root.unbind('remove')\n",
- "\n",
- " // Update the output cell to use the data from the current canvas.\n",
- " fig.push_to_output();\n",
- " var dataURL = fig.canvas.toDataURL();\n",
- " // Re-enable the keyboard manager in IPython - without this line, in FF,\n",
- " // the notebook keyboard shortcuts fail.\n",
- " IPython.keyboard_manager.enable()\n",
- " $(fig.parent_element).html('<img src=\"' + dataURL + '\" width=\"' + width + '\">');\n",
- " fig.close_ws(fig, msg);\n",
- "}\n",
- "\n",
- "mpl.figure.prototype.close_ws = function(fig, msg){\n",
- " fig.send_message('closing', msg);\n",
- " // fig.ws.close()\n",
- "}\n",
- "\n",
- "mpl.figure.prototype.push_to_output = function(remove_interactive) {\n",
- " // Turn the data on the canvas into data in the output cell.\n",
- " var width = this.canvas.width/mpl.ratio\n",
- " var dataURL = this.canvas.toDataURL();\n",
- " this.cell_info[1]['text/html'] = '<img src=\"' + dataURL + '\" width=\"' + width + '\">';\n",
- "}\n",
- "\n",
- "mpl.figure.prototype.updated_canvas_event = function() {\n",
- " // Tell IPython that the notebook contents must change.\n",
- " IPython.notebook.set_dirty(true);\n",
- " this.send_message(\"ack\", {});\n",
- " var fig = this;\n",
- " // Wait a second, then push the new image to the DOM so\n",
- " // that it is saved nicely (might be nice to debounce this).\n",
- " setTimeout(function () { fig.push_to_output() }, 1000);\n",
- "}\n",
- "\n",
- "mpl.figure.prototype._init_toolbar = function() {\n",
- " var fig = this;\n",
- "\n",
- " var nav_element = $('<div/>')\n",
- " nav_element.attr('style', 'width: 100%');\n",
- " this.root.append(nav_element);\n",
- "\n",
- " // Define a callback function for later on.\n",
- " function toolbar_event(event) {\n",
- " return fig.toolbar_button_onclick(event['data']);\n",
- " }\n",
- " function toolbar_mouse_event(event) {\n",
- " return fig.toolbar_button_onmouseover(event['data']);\n",
- " }\n",
- "\n",
- " for(var toolbar_ind in mpl.toolbar_items){\n",
- " var name = mpl.toolbar_items[toolbar_ind][0];\n",
- " var tooltip = mpl.toolbar_items[toolbar_ind][1];\n",
- " var image = mpl.toolbar_items[toolbar_ind][2];\n",
- " var method_name = mpl.toolbar_items[toolbar_ind][3];\n",
- "\n",
- " if (!name) { continue; };\n",
- "\n",
- " var button = $('<button class=\"btn btn-default\" href=\"#\" title=\"' + name + '\"><i class=\"fa ' + image + ' fa-lg\"></i></button>');\n",
- " button.click(method_name, toolbar_event);\n",
- " button.mouseover(tooltip, toolbar_mouse_event);\n",
- " nav_element.append(button);\n",
- " }\n",
- "\n",
- " // Add the status bar.\n",
- " var status_bar = $('<span class=\"mpl-message\" style=\"text-align:right; float: right;\"/>');\n",
- " nav_element.append(status_bar);\n",
- " this.message = status_bar[0];\n",
- "\n",
- " // Add the close button to the window.\n",
- " var buttongrp = $('<div class=\"btn-group inline pull-right\"></div>');\n",
- " var button = $('<button class=\"btn btn-mini btn-primary\" href=\"#\" title=\"Stop Interaction\"><i class=\"fa fa-power-off icon-remove icon-large\"></i></button>');\n",
- " button.click(function (evt) { fig.handle_close(fig, {}); } );\n",
- " button.mouseover('Stop Interaction', toolbar_mouse_event);\n",
- " buttongrp.append(button);\n",
- " var titlebar = this.root.find($('.ui-dialog-titlebar'));\n",
- " titlebar.prepend(buttongrp);\n",
- "}\n",
- "\n",
- "mpl.figure.prototype._root_extra_style = function(el){\n",
- " var fig = this\n",
- " el.on(\"remove\", function(){\n",
- "\tfig.close_ws(fig, {});\n",
- " });\n",
- "}\n",
- "\n",
- "mpl.figure.prototype._canvas_extra_style = function(el){\n",
- " // this is important to make the div 'focusable\n",
- " el.attr('tabindex', 0)\n",
- " // reach out to IPython and tell the keyboard manager to turn it's self\n",
- " // off when our div gets focus\n",
- "\n",
- " // location in version 3\n",
- " if (IPython.notebook.keyboard_manager) {\n",
- " IPython.notebook.keyboard_manager.register_events(el);\n",
- " }\n",
- " else {\n",
- " // location in version 2\n",
- " IPython.keyboard_manager.register_events(el);\n",
- " }\n",
- "\n",
- "}\n",
- "\n",
- "mpl.figure.prototype._key_event_extra = function(event, name) {\n",
- " var manager = IPython.notebook.keyboard_manager;\n",
- " if (!manager)\n",
- " manager = IPython.keyboard_manager;\n",
- "\n",
- " // Check for shift+enter\n",
- " if (event.shiftKey && event.which == 13) {\n",
- " this.canvas_div.blur();\n",
- " // select the cell after this one\n",
- " var index = IPython.notebook.find_cell_index(this.cell_info[0]);\n",
- " IPython.notebook.select(index + 1);\n",
- " }\n",
- "}\n",
- "\n",
- "mpl.figure.prototype.handle_save = function(fig, msg) {\n",
- " fig.ondownload(fig, null);\n",
- "}\n",
- "\n",
- "\n",
- "mpl.find_output_cell = function(html_output) {\n",
- " // Return the cell and output element which can be found *uniquely* in the notebook.\n",
- " // Note - this is a bit hacky, but it is done because the \"notebook_saving.Notebook\"\n",
- " // IPython event is triggered only after the cells have been serialised, which for\n",
- " // our purposes (turning an active figure into a static one), is too late.\n",
- " var cells = IPython.notebook.get_cells();\n",
- " var ncells = cells.length;\n",
- " for (var i=0; i<ncells; i++) {\n",
- " var cell = cells[i];\n",
- " if (cell.cell_type === 'code'){\n",
- " for (var j=0; j<cell.output_area.outputs.length; j++) {\n",
- " var data = cell.output_area.outputs[j];\n",
- " if (data.data) {\n",
- " // IPython >= 3 moved mimebundle to data attribute of output\n",
- " data = data.data;\n",
- " }\n",
- " if (data['text/html'] == html_output) {\n",
- " return [cell, data, j];\n",
- " }\n",
- " }\n",
- " }\n",
- " }\n",
- "}\n",
- "\n",
- "// Register the function which deals with the matplotlib target/channel.\n",
- "// The kernel may be null if the page has been refreshed.\n",
- "if (IPython.notebook.kernel != null) {\n",
- " IPython.notebook.kernel.comm_manager.register_target('matplotlib', mpl.mpl_figure_comm);\n",
- "}\n"
- ],
- "text/plain": [
- "<IPython.core.display.Javascript object>"
- ]
- },
- "metadata": {},
- "output_type": "display_data"
- },
- {
- "data": {
- "text/html": [
- "<img src=\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAABDgAAAIcCAYAAAAT/R6VAAAgAElEQVR4Xux9B3xb1dn+oy3ZkvfKsJ2dkLAT9t6zg9FFW0r5PjYdlA5o6aClQKGD9qOU1QUt7R8ohZZV9igUaBJCICGQYJLYcTziKQ9t/X/P1b32lSLZV7ZkX9vvG4Rk6dxzz3nOkc57nvMOC0QEAUFAEBAEBAFBQBAQBAQBQUAQEAQEAUFAEJjiCFimePul+YKAICAICAKCgCAgCAgCgoAgIAgIAoKAICAIQAgOmQTTDYE/AfgsgFsBfMlA51YDWKmW5TVjETuAMIAoAL7WJNP7o91jEYDNAD4AwNf5lv8FcBeA3wLga7PLdQC+ozbyFABPmr3B0j5BQBAQBKYgArKeZj9oZl9PtfY9C+D47Ls3Ja7YE8A6AL8G8JUMLS4HcAmAkwEsAVACYEDVvV4 [...]
- ],
- "text/plain": [
- "<IPython.core.display.HTML object>"
- ]
- },
- "metadata": {},
- "output_type": "display_data"
- },
- {
- "data": {
- "text/plain": [
- "<matplotlib.legend.Legend at 0x156c14f10>"
- ]
- },
- "execution_count": 9,
- "metadata": {},
- "output_type": "execute_result"
- },
- {
- "data": {
- "text/plain": [
- "Text(0.5,21,'Iteration')"
- ]
- },
- "execution_count": 9,
- "metadata": {},
- "output_type": "execute_result"
- },
- {
- "data": {
- "text/plain": [
- "Text(0.5,1,'Validation Accuracy')"
- ]
- },
- "execution_count": 9,
- "metadata": {},
- "output_type": "execute_result"
- },
- {
- "data": {
- "text/plain": [
- "Text(0.5,21,'Iteration')"
- ]
- },
- "execution_count": 9,
- "metadata": {},
- "output_type": "execute_result"
- },
- {
- "data": {
- "text/plain": [
- "Text(0.5,1,'Validation Loss (Cross Entropy)')"
- ]
- },
- "execution_count": 9,
- "metadata": {},
- "output_type": "execute_result"
- },
- {
- "name": "stdout",
- "output_type": "stream",
- "text": [
- " * postgresql://gpadmin@localhost:8000/cifar_places\n",
- "1 rows affected.\n"
- ]
- },
- {
- "data": {
- "text/plain": [
- "[<matplotlib.lines.Line2D at 0x156ccc1d0>]"
- ]
- },
- "execution_count": 9,
- "metadata": {},
- "output_type": "execute_result"
- },
- {
- "data": {
- "text/plain": [
- "[<matplotlib.lines.Line2D at 0x156ccc150>]"
- ]
- },
- "execution_count": 9,
- "metadata": {},
- "output_type": "execute_result"
- },
- {
- "name": "stdout",
- "output_type": "stream",
- "text": [
- " * postgresql://gpadmin@localhost:8000/cifar_places\n",
- "1 rows affected.\n"
- ]
- },
- {
- "data": {
- "text/plain": [
- "[<matplotlib.lines.Line2D at 0x156c9a110>]"
- ]
- },
- "execution_count": 9,
- "metadata": {},
- "output_type": "execute_result"
- },
- {
- "data": {
- "text/plain": [
- "[<matplotlib.lines.Line2D at 0x156c9af50>]"
- ]
- },
- "execution_count": 9,
- "metadata": {},
- "output_type": "execute_result"
- },
- {
- "name": "stdout",
- "output_type": "stream",
- "text": [
- " * postgresql://gpadmin@localhost:8000/cifar_places\n",
- "1 rows affected.\n"
- ]
- },
- {
- "data": {
- "text/plain": [
- "[<matplotlib.lines.Line2D at 0x156cda710>]"
- ]
- },
- "execution_count": 9,
- "metadata": {},
- "output_type": "execute_result"
- },
- {
- "data": {
- "text/plain": [
- "[<matplotlib.lines.Line2D at 0x156cdad90>]"
- ]
- },
- "execution_count": 9,
- "metadata": {},
- "output_type": "execute_result"
- },
- {
- "name": "stdout",
- "output_type": "stream",
- "text": [
- " * postgresql://gpadmin@localhost:8000/cifar_places\n",
- "1 rows affected.\n"
- ]
- },
- {
- "data": {
- "text/plain": [
- "[<matplotlib.lines.Line2D at 0x156ced550>]"
- ]
- },
- "execution_count": 9,
- "metadata": {},
- "output_type": "execute_result"
- },
- {
- "data": {
- "text/plain": [
- "[<matplotlib.lines.Line2D at 0x156cc1e10>]"
- ]
- },
- "execution_count": 9,
- "metadata": {},
- "output_type": "execute_result"
- },
- {
- "name": "stdout",
- "output_type": "stream",
- "text": [
- " * postgresql://gpadmin@localhost:8000/cifar_places\n",
- "1 rows affected.\n"
- ]
- },
- {
- "data": {
- "text/plain": [
- "[<matplotlib.lines.Line2D at 0x156cedad0>]"
- ]
- },
- "execution_count": 9,
- "metadata": {},
- "output_type": "execute_result"
- },
- {
- "data": {
- "text/plain": [
- "[<matplotlib.lines.Line2D at 0x156cedc50>]"
- ]
- },
- "execution_count": 9,
- "metadata": {},
- "output_type": "execute_result"
- },
- {
- "name": "stdout",
- "output_type": "stream",
- "text": [
- " * postgresql://gpadmin@localhost:8000/cifar_places\n",
- "1 rows affected.\n"
- ]
- },
- {
- "data": {
- "text/plain": [
- "[<matplotlib.lines.Line2D at 0x156cfc410>]"
- ]
- },
- "execution_count": 9,
- "metadata": {},
- "output_type": "execute_result"
- },
- {
- "data": {
- "text/plain": [
- "[<matplotlib.lines.Line2D at 0x156cfc990>]"
- ]
- },
- "execution_count": 9,
- "metadata": {},
- "output_type": "execute_result"
- },
- {
- "name": "stdout",
- "output_type": "stream",
- "text": [
- " * postgresql://gpadmin@localhost:8000/cifar_places\n",
- "1 rows affected.\n"
- ]
- },
- {
- "data": {
- "text/plain": [
- "[<matplotlib.lines.Line2D at 0x156cfced0>]"
- ]
- },
- "execution_count": 9,
- "metadata": {},
- "output_type": "execute_result"
- },
- {
- "data": {
- "text/plain": [
- "[<matplotlib.lines.Line2D at 0x156d060d0>]"
- ]
- },
- "execution_count": 9,
- "metadata": {},
- "output_type": "execute_result"
- },
- {
- "name": "stdout",
- "output_type": "stream",
- "text": [
- " * postgresql://gpadmin@localhost:8000/cifar_places\n",
- "1 rows affected.\n"
- ]
- },
- {
- "data": {
- "text/plain": [
- "[<matplotlib.lines.Line2D at 0x156d068d0>]"
- ]
- },
- "execution_count": 9,
- "metadata": {},
- "output_type": "execute_result"
- },
- {
- "data": {
- "text/plain": [
- "[<matplotlib.lines.Line2D at 0x156cdabd0>]"
- ]
- },
- "execution_count": 9,
- "metadata": {},
- "output_type": "execute_result"
- },
- {
- "name": "stdout",
- "output_type": "stream",
- "text": [
- " * postgresql://gpadmin@localhost:8000/cifar_places\n",
- "1 rows affected.\n"
- ]
- },
- {
- "data": {
- "text/plain": [
- "[<matplotlib.lines.Line2D at 0x156d069d0>]"
- ]
- },
- "execution_count": 9,
- "metadata": {},
- "output_type": "execute_result"
- },
- {
- "data": {
- "text/plain": [
- "[<matplotlib.lines.Line2D at 0x156d06e50>]"
- ]
- },
- "execution_count": 9,
- "metadata": {},
- "output_type": "execute_result"
- },
- {
- "name": "stdout",
- "output_type": "stream",
- "text": [
- " * postgresql://gpadmin@localhost:8000/cifar_places\n",
- "1 rows affected.\n"
- ]
- },
- {
- "data": {
- "text/plain": [
- "[<matplotlib.lines.Line2D at 0x156d046d0>]"
- ]
- },
- "execution_count": 9,
- "metadata": {},
- "output_type": "execute_result"
- },
- {
- "data": {
- "text/plain": [
- "[<matplotlib.lines.Line2D at 0x156d04b10>]"
- ]
- },
- "execution_count": 9,
- "metadata": {},
- "output_type": "execute_result"
- },
- {
- "name": "stdout",
- "output_type": "stream",
- "text": [
- " * postgresql://gpadmin@localhost:8000/cifar_places\n",
- "1 rows affected.\n"
- ]
- },
- {
- "data": {
- "text/plain": [
- "[<matplotlib.lines.Line2D at 0x156d1c090>]"
- ]
- },
- "execution_count": 9,
- "metadata": {},
- "output_type": "execute_result"
- },
- {
- "data": {
- "text/plain": [
- "[<matplotlib.lines.Line2D at 0x156d1c110>]"
- ]
- },
- "execution_count": 9,
- "metadata": {},
- "output_type": "execute_result"
- },
- {
- "name": "stdout",
- "output_type": "stream",
- "text": [
- " * postgresql://gpadmin@localhost:8000/cifar_places\n",
- "1 rows affected.\n"
- ]
- },
- {
- "data": {
- "text/plain": [
- "[<matplotlib.lines.Line2D at 0x156d1c990>]"
- ]
- },
- "execution_count": 9,
- "metadata": {},
- "output_type": "execute_result"
- },
- {
- "data": {
- "text/plain": [
- "[<matplotlib.lines.Line2D at 0x156cfc4d0>]"
- ]
- },
- "execution_count": 9,
- "metadata": {},
- "output_type": "execute_result"
- },
- {
- "name": "stdout",
- "output_type": "stream",
- "text": [
- " * postgresql://gpadmin@localhost:8000/cifar_places\n",
- "1 rows affected.\n"
- ]
- },
- {
- "data": {
- "text/plain": [
- "[<matplotlib.lines.Line2D at 0x156d1c910>]"
- ]
- },
- "execution_count": 9,
- "metadata": {},
- "output_type": "execute_result"
- },
- {
- "data": {
- "text/plain": [
- "[<matplotlib.lines.Line2D at 0x156d24050>]"
- ]
- },
- "execution_count": 9,
- "metadata": {},
- "output_type": "execute_result"
- },
- {
- "name": "stdout",
- "output_type": "stream",
- "text": [
- " * postgresql://gpadmin@localhost:8000/cifar_places\n",
- "1 rows affected.\n"
- ]
- },
- {
- "data": {
- "text/plain": [
- "[<matplotlib.lines.Line2D at 0x156d247d0>]"
- ]
- },
- "execution_count": 9,
- "metadata": {},
- "output_type": "execute_result"
- },
- {
- "data": {
- "text/plain": [
- "[<matplotlib.lines.Line2D at 0x156d248d0>]"
- ]
- },
- "execution_count": 9,
- "metadata": {},
- "output_type": "execute_result"
- },
- {
- "name": "stdout",
- "output_type": "stream",
- "text": [
- " * postgresql://gpadmin@localhost:8000/cifar_places\n",
- "1 rows affected.\n"
- ]
- },
- {
- "data": {
- "text/plain": [
- "[<matplotlib.lines.Line2D at 0x156d330d0>]"
- ]
- },
- "execution_count": 9,
- "metadata": {},
- "output_type": "execute_result"
- },
- {
- "data": {
- "text/plain": [
- "[<matplotlib.lines.Line2D at 0x156d33250>]"
- ]
- },
- "execution_count": 9,
- "metadata": {},
- "output_type": "execute_result"
- },
- {
- "name": "stdout",
- "output_type": "stream",
- "text": [
- " * postgresql://gpadmin@localhost:8000/cifar_places\n",
- "1 rows affected.\n"
- ]
- },
- {
- "data": {
- "text/plain": [
- "[<matplotlib.lines.Line2D at 0x156d33a50>]"
- ]
- },
- "execution_count": 9,
- "metadata": {},
- "output_type": "execute_result"
- },
- {
- "data": {
- "text/plain": [
- "[<matplotlib.lines.Line2D at 0x156d33bd0>]"
- ]
- },
- "execution_count": 9,
- "metadata": {},
- "output_type": "execute_result"
- },
- {
- "data": {
- "text/plain": [
- "<matplotlib.legend.Legend at 0x156c72690>"
- ]
- },
- "execution_count": 9,
- "metadata": {},
- "output_type": "execute_result"
- }
- ],
- "source": [
- "df_results = %sql SELECT * FROM cifar10_multi_model_info ORDER BY validation_loss_final ASC LIMIT 100;\n",
- "df_results = df_results.DataFrame()\n",
- "\n",
- "df_summary = %sql SELECT * FROM cifar10_multi_model_summary;\n",
- "df_summary = df_summary.DataFrame()\n",
- "\n",
- "#set up plots\n",
- "fig, axs = plt.subplots(nrows=1, ncols=2, figsize=(10,5))\n",
- "fig.legend(ncol=4)\n",
- "fig.tight_layout()\n",
- "\n",
- "ax_metric = axs[0]\n",
- "ax_loss = axs[1]\n",
- "\n",
- "ax_metric.xaxis.set_major_locator(MaxNLocator(integer=True))\n",
- "ax_metric.set_xlabel('Iteration')\n",
- "#ax_metric.set_ylabel('Accuracy')\n",
- "ax_metric.set_title('Validation Accuracy')\n",
- "\n",
- "ax_loss.xaxis.set_major_locator(MaxNLocator(integer=True))\n",
- "ax_loss.set_xlabel('Iteration')\n",
- "#ax_loss.set_ylabel('Cross Entropy Loss')\n",
- "ax_loss.set_title('Validation Loss (Cross Entropy)')\n",
- "\n",
- "iters = df_summary['metrics_iters'][0]\n",
- "\n",
- "for mst_key in df_results['mst_key']:\n",
- " df_output_info = %sql SELECT validation_metrics,validation_loss FROM cifar10_multi_model_info WHERE mst_key = $mst_key\n",
- " df_output_info = df_output_info.DataFrame()\n",
- " validation_metrics = df_output_info['validation_metrics'][0]\n",
- " validation_loss = df_output_info['validation_loss'][0]\n",
- " \n",
- " #ax_metric.plot(iters, validation_metrics, label=mst_key, marker='o')\n",
- " ax_metric.plot(iters, validation_metrics)\n",
- " \n",
- " #ax_loss.plot(iters, validation_loss, label=mst_key, marker='o')\n",
- " ax_loss.plot(iters, validation_loss)\n",
- "\n",
- "plt.legend()\n",
- "# fig.savefig('./lc_keras_fit.png', dpi = 300)"
- ]
- },
- {
- "cell_type": "markdown",
- "metadata": {},
- "source": [
- "Plot training and validation curves together"
- ]
- },
- {
- "cell_type": "code",
- "execution_count": 13,
- "metadata": {},
- "outputs": [
- {
- "name": "stdout",
- "output_type": "stream",
- "text": [
- " * postgresql://gpadmin@localhost:8000/cifar_places\n",
- "1 rows affected.\n",
- " * postgresql://gpadmin@localhost:8000/cifar_places\n",
"1 rows affected.\n"
]
},
@@ -7313,7 +4235,7 @@
{
"data": {
"text/html": [
- "<img src=\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAABDgAAAIcCAYAAAAT/R6VAAAgAElEQVR4XuydB5hURfbFz+QhDVlyDpJBkogCYlgzBnQXA2bd/7qYWXMAE8bVNSu6Zl0jCmIkCEhOkqMEyUPOTP5/5/V70LQdXs90z1R3n/q+kXG6Xr1bv6qZd9+pW7eSoCICIiACIiACIiACIiACIiACIiACIiACMU4gKcbtl/kiIAIiIAIiIAIiIAIiIAIiIAIiIAIiAAkcmgSmEuDc7A/gEgDHAzjGNnQzgJkAPgPwNYACrw6sAdAIQBMA/N7E0hjAagBrAfB733ITgP8D0AJAple9IQAeBjAUAL83rfwCoA+AvgD4vcmFc+t3e55wPjUAkG+ywbJNBERABETAGALF8U+MMT4Chjh+TKim5gHoFKqSPg9JwPH/3gNwdcjaqiACIiCBQ3PASAL1AXw [...]
+ "<img src=\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAABDgAAAIcCAYAAAAT/R6VAAAgAElEQVR4Xux9B3hc1bX1mhmNZtR7tyw32bIBY9yoNhCqqQklQHqDNCDtpff/JS8JhFRSXkh7CUkooRMCMWBsTLVNtS1ZsmXZclHvZfr837pzr3Q1mpHujEbSlbTP941Hls6995x1zszZZ52197ZAiiAgCAgCgoAgIAgIAoKAICAICAKCgCAgCAgCMxwBywxvvzRfEBAEBAFBQBAQBAQBQUAQEAQEAUFAEBAEBAEIwSGTYLYhcDeA9wK4E8AtBjq3E8AatS6viackAfAC8APgz1qJ9vvxnrEEQB2AAwD482SXjwG4C8AfAPBns5fvAfi62shNAJ40e4OlfYKAICAIzEAEZD2NfdDMvp5q7XsGwPmxd29GXHEigDcA/ArAZ6K0OA/AJwFcDGApgGwAA6r [...]
],
"text/plain": [
"<IPython.core.display.HTML object>"
@@ -7323,114 +4245,104 @@
"output_type": "display_data"
},
{
- "data": {
- "text/plain": [
- "<matplotlib.legend.Legend at 0x1570e6a50>"
- ]
- },
- "execution_count": 13,
- "metadata": {},
- "output_type": "execute_result"
- },
- {
- "data": {
- "text/plain": [
- "Text(0.5,21,'Iteration')"
- ]
- },
- "execution_count": 13,
- "metadata": {},
- "output_type": "execute_result"
- },
- {
- "data": {
- "text/plain": [
- "Text(0.5,1,'Classification Accuracy')"
- ]
- },
- "execution_count": 13,
- "metadata": {},
- "output_type": "execute_result"
- },
- {
- "data": {
- "text/plain": [
- "Text(0.5,21,'Iteration')"
- ]
- },
- "execution_count": 13,
- "metadata": {},
- "output_type": "execute_result"
- },
- {
- "data": {
- "text/plain": [
- "Text(0.5,1,'Cross Entropy Loss')"
- ]
- },
- "execution_count": 13,
- "metadata": {},
- "output_type": "execute_result"
- },
- {
"name": "stdout",
"output_type": "stream",
"text": [
- " * postgresql://gpadmin@localhost:8000/cifar_places\n",
"1 rows affected.\n",
- " * postgresql://gpadmin@localhost:8000/cifar_places\n",
+ "1 rows affected.\n",
+ "1 rows affected.\n",
+ "1 rows affected.\n",
+ "1 rows affected.\n",
+ "1 rows affected.\n",
+ "1 rows affected.\n",
+ "1 rows affected.\n",
+ "1 rows affected.\n",
+ "1 rows affected.\n",
+ "1 rows affected.\n",
+ "1 rows affected.\n",
+ "1 rows affected.\n",
+ "1 rows affected.\n",
+ "1 rows affected.\n",
"1 rows affected.\n"
]
- },
- {
- "data": {
- "text/plain": [
- "[<matplotlib.lines.Line2D at 0x157191790>]"
- ]
- },
- "execution_count": 13,
- "metadata": {},
- "output_type": "execute_result"
- },
- {
- "data": {
- "text/plain": [
- "[<matplotlib.lines.Line2D at 0x157191c10>]"
- ]
- },
- "execution_count": 13,
- "metadata": {},
- "output_type": "execute_result"
- },
+ }
+ ],
+ "source": [
+ "df_results = %sql SELECT * FROM cifar10_multi_model_info ORDER BY validation_metrics_final DESC LIMIT 100;\n",
+ "df_results = df_results.DataFrame()\n",
+ "\n",
+ "df_summary = %sql SELECT * FROM cifar10_multi_model_summary;\n",
+ "df_summary = df_summary.DataFrame()\n",
+ "\n",
+ "#set up plots\n",
+ "fig, axs = plt.subplots(nrows=1, ncols=2, figsize=(10,5))\n",
+ "fig.legend(ncol=4)\n",
+ "fig.tight_layout()\n",
+ "\n",
+ "ax_metric = axs[0]\n",
+ "ax_loss = axs[1]\n",
+ "\n",
+ "ax_metric.xaxis.set_major_locator(MaxNLocator(integer=True))\n",
+ "ax_metric.set_xlabel('Iteration')\n",
+ "#ax_metric.set_ylabel('Accuracy')\n",
+ "ax_metric.set_title('Validation Accuracy')\n",
+ "\n",
+ "ax_loss.xaxis.set_major_locator(MaxNLocator(integer=True))\n",
+ "ax_loss.set_xlabel('Iteration')\n",
+ "#ax_loss.set_ylabel('Cross Entropy Loss')\n",
+ "ax_loss.set_title('Validation Loss (Cross Entropy)')\n",
+ "\n",
+ "iters = df_summary['metrics_iters'][0]\n",
+ "\n",
+ "for mst_key in df_results['mst_key']:\n",
+ " df_output_info = %sql SELECT validation_metrics,validation_loss FROM cifar10_multi_model_info WHERE mst_key = $mst_key\n",
+ " df_output_info = df_output_info.DataFrame()\n",
+ " validation_metrics = df_output_info['validation_metrics'][0]\n",
+ " validation_loss = df_output_info['validation_loss'][0]\n",
+ " \n",
+ " #ax_metric.plot(iters, validation_metrics, label=mst_key, marker='o')\n",
+ " ax_metric.plot(iters, validation_metrics)\n",
+ " \n",
+ " #ax_loss.plot(iters, validation_loss, label=mst_key, marker='o')\n",
+ " ax_loss.plot(iters, validation_loss)\n",
+ "\n",
+ "plt.legend();\n",
+ "# fig.savefig('./lc_keras_fit.png', dpi = 300)"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "Plot training and validation curves together"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 40,
+ "metadata": {},
+ "outputs": [
{
- "data": {
- "text/plain": [
- "[<matplotlib.lines.Line2D at 0x1571912d0>]"
- ]
- },
- "execution_count": 13,
- "metadata": {},
- "output_type": "execute_result"
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "1 rows affected.\n",
+ "1 rows affected.\n",
+ "1 rows affected.\n",
+ "1 rows affected.\n"
+ ]
},
{
"data": {
+ "image/png": "iVBORw0KGgoAAAANSUhEUgAAAtQAAAF6CAYAAAA508/zAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADl0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uIDIuMi41LCBodHRwOi8vbWF0cGxvdGxpYi5vcmcvSM8oowAAIABJREFUeJzs3Xd4VVXWx/HvSicQCKSHEGqAFAiQAFJUEJAOKjZsgChjf8eOHRl1cEaxjDoWQFBHUZEuAtIUEaXXhF5TCaEFQki5+/3jXCT0AElOyvo8Tx6SU+5Z9wL7/rLvPnuLMQallFJKKaXU5XGxuwCllFJKKaXKMw3USimllFJKXQEN1EoppZRSSl0BN7sLUEoppZRSqixZuXJloJub2xgghtM7oB3Ahvz8/Pvi4uL2ndyogVoppZRSSqlC3NzcxgQHB0cGBAQcdHFx+WsGD4fD [...]
"text/plain": [
- "[<matplotlib.lines.Line2D at 0x157184890>]"
+ "<Figure size 720x360 with 2 Axes>"
]
},
- "execution_count": 13,
- "metadata": {},
- "output_type": "execute_result"
- },
- {
- "data": {
- "text/plain": [
- "<matplotlib.legend.Legend at 0x15719c810>"
- ]
+ "metadata": {
+ "needs_background": "light"
},
- "execution_count": 13,
- "metadata": {},
- "output_type": "execute_result"
+ "output_type": "display_data"
}
],
"source": [
@@ -7482,15 +4394,13 @@
" ax_metric.plot(iters, training_metrics, label=label_train)\n",
" ax_loss.plot(iters, training_loss, label=label_train)\n",
" \n",
- " \n",
" label_test = str(mst_key) + '-test'\n",
" #ax_metric.plot(iters, validation_metrics, label=label_test, marker='o')\n",
" #ax_loss.plot(iters, validation_loss, label=label_test, marker='o')\n",
" ax_metric.plot(iters, validation_metrics, label=label_test)\n",
" ax_loss.plot(iters, validation_loss, label=label_test)\n",
"\n",
- "\n",
- "plt.legend()\n",
+ "plt.legend();\n",
"# fig.savefig('./lc_keras_fit.png', dpi = 300)"
]
},
@@ -7508,14 +4418,13 @@
},
{
"cell_type": "code",
- "execution_count": 14,
+ "execution_count": 10,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
- " * postgresql://gpadmin@localhost:8000/cifar_places\n",
"1 rows affected.\n"
]
},
@@ -7548,24 +4457,24 @@
" <td>batch_size=128,epochs=5</td>\n",
" <td>madlib_keras</td>\n",
" <td>2159.70019531</td>\n",
- " <td>[158.506701946259, 323.779083013535, 491.302199840546, 660.148201942444, 829.340363025665, 999.844955921173, 1169.83032798767, 1340.5411260128, 1513.8498609066, 1687.69545793533]</td>\n",
+ " <td>[157.675038099289, 323.760583877563, 489.999938964844, 658.165150880814, 826.338515996933, 995.962205886841, 1166.19140601158, 1335.88773202896, 1507.49120998383, 1679.03732204437]</td>\n",
" <td>[u'accuracy']</td>\n",
- " <td>0.867579996586</td>\n",
- " <td>0.380911707878</td>\n",
- " <td>[0.576640009880066, 0.66431999206543, 0.707199990749359, 0.749520003795624, 0.778980016708374, 0.799520015716553, 0.820659995079041, 0.839940011501312, 0.854659974575043, 0.867579996585846]</td>\n",
- " <td>[1.20035827159882, 0.945839285850525, 0.823047578334808, 0.703792750835419, 0.624295234680176, 0.566677749156952, 0.511338114738464, 0.459649682044983, 0.418204575777054, 0.380911707878113]</td>\n",
- " <td>0.799700021744</td>\n",
- " <td>0.571797966957</td>\n",
- " <td>[0.572700023651123, 0.655099987983704, 0.69980001449585, 0.731299996376038, 0.756399989128113, 0.771399974822998, 0.778999984264374, 0.791599988937378, 0.798200011253357, 0.799700021743774]</td>\n",
- " <td>[1.20565474033356, 0.964107036590576, 0.849484860897064, 0.752416431903839, 0.691979646682739, 0.65268349647522, 0.628291726112366, 0.599337160587311, 0.586054861545563, 0.571797966957092]</td>\n",
+ " <td>0.865880012512</td>\n",
+ " <td>0.386452704668</td>\n",
+ " <td>[0.554459989070892, 0.660399973392487, 0.71670001745224, 0.754540026187897, 0.78276002407074, 0.806519985198975, 0.81879997253418, 0.83898001909256, 0.850740015506744, 0.865880012512207]</td>\n",
+ " <td>[1.26610136032104, 0.961102485656738, 0.805769920349121, 0.702959299087524, 0.625120878219604, 0.556592226028442, 0.513025283813477, 0.460623860359192, 0.426946371793747, 0.386452704668045]</td>\n",
+ " <td>0.806100010872</td>\n",
+ " <td>0.569638252258</td>\n",
+ " <td>[0.552999973297119, 0.657100021839142, 0.711000025272369, 0.737600028514862, 0.758300006389618, 0.77700001001358, 0.783100008964539, 0.794099986553192, 0.801199972629547, 0.806100010871887]</td>\n",
+ " <td>[1.26569390296936, 0.972574234008789, 0.835387766361237, 0.750236749649048, 0.694831550121307, 0.648999333381653, 0.622370600700378, 0.599871814250946, 0.581832528114319, 0.569638252258301]</td>\n",
" </tr>\n",
"</table>"
],
"text/plain": [
- "[(10, 2, u\"loss='categorical_crossentropy',optimizer='adam(lr=0.0001)',metrics=['accuracy']\", u'batch_size=128,epochs=5', u'madlib_keras', 2159.70019531, [158.506701946259, 323.779083013535, 491.302199840546, 660.148201942444, 829.340363025665, 999.844955921173, 1169.83032798767, 1340.5411260128, 1513.8498609066, 1687.69545793533], [u'accuracy'], 0.867579996586, 0.380911707878, [0.576640009880066, 0.66431999206543, 0.707199990749359, 0.749520003795624, 0.778980016708374, 0.7995 [...]
+ "[(10, 2, u\"loss='categorical_crossentropy',optimizer='adam(lr=0.0001)',metrics=['accuracy']\", u'batch_size=128,epochs=5', u'madlib_keras', 2159.70019531, [157.675038099289, 323.760583877563, 489.999938964844, 658.165150880814, 826.338515996933, 995.962205886841, 1166.19140601158, 1335.88773202896, 1507.49120998383, 1679.03732204437], [u'accuracy'], 0.865880012512, 0.386452704668, [0.554459989070892, 0.660399973392487, 0.71670001745224, 0.754540026187897, 0.78276002407074, 0.806 [...]
]
},
- "execution_count": 14,
+ "execution_count": 10,
"metadata": {},
"output_type": "execute_result"
}
@@ -7577,14 +4486,13 @@
},
{
"cell_type": "code",
- "execution_count": 15,
+ "execution_count": 11,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
- " * postgresql://gpadmin@localhost:8000/cifar_places\n",
"Done.\n",
"1 rows affected.\n",
"5 rows affected.\n"
@@ -7612,7 +4520,7 @@
" </tr>\n",
" <tr>\n",
" <td>4</td>\n",
- " <td>8</td>\n",
+ " <td>0</td>\n",
" </tr>\n",
" <tr>\n",
" <td>5</td>\n",
@@ -7621,10 +4529,10 @@
"</table>"
],
"text/plain": [
- "[(1, 3), (2, 8), (3, 8), (4, 8), (5, 6)]"
+ "[(1, 3), (2, 8), (3, 8), (4, 0), (5, 6)]"
]
},
- "execution_count": 15,
+ "execution_count": 11,
"metadata": {},
"output_type": "execute_result"
}
@@ -7655,14 +4563,13 @@
},
{
"cell_type": "code",
- "execution_count": 16,
+ "execution_count": 12,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
- " * postgresql://gpadmin@localhost:8000/cifar_places\n",
"1 rows affected.\n"
]
},
@@ -7674,15 +4581,15 @@
" <th>count</th>\n",
" </tr>\n",
" <tr>\n",
- " <td>2003</td>\n",
+ " <td>1939</td>\n",
" </tr>\n",
"</table>"
],
"text/plain": [
- "[(2003L,)]"
+ "[(1939L,)]"
]
},
- "execution_count": 16,
+ "execution_count": 12,
"metadata": {},
"output_type": "execute_result"
}
@@ -7702,14 +4609,13 @@
},
{
"cell_type": "code",
- "execution_count": 17,
+ "execution_count": 13,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
- " * postgresql://gpadmin@localhost:8000/cifar_places\n",
"1 rows affected.\n"
]
},
@@ -7721,15 +4627,15 @@
" <th>test_accuracy_percent</th>\n",
" </tr>\n",
" <tr>\n",
- " <td>79.97</td>\n",
+ " <td>80.61</td>\n",
" </tr>\n",
"</table>"
],
"text/plain": [
- "[(Decimal('79.97'),)]"
+ "[(Decimal('80.61'),)]"
]
},
- "execution_count": 17,
+ "execution_count": 13,
"metadata": {},
"output_type": "execute_result"
}
@@ -7754,7 +4660,7 @@
},
{
"cell_type": "code",
- "execution_count": 18,
+ "execution_count": 14,
"metadata": {},
"outputs": [],
"source": [
@@ -7781,14 +4687,13 @@
},
{
"cell_type": "code",
- "execution_count": 19,
+ "execution_count": 21,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
- " * postgresql://gpadmin@localhost:8000/cifar_places\n",
"Done.\n",
"1 rows affected.\n"
]
@@ -7799,7 +4704,7 @@
"[]"
]
},
- "execution_count": 19,
+ "execution_count": 21,
"metadata": {},
"output_type": "execute_result"
}
@@ -7820,14 +4725,13 @@
},
{
"cell_type": "code",
- "execution_count": 20,
+ "execution_count": 22,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
- " * postgresql://gpadmin@localhost:8000/cifar_places\n",
"Done.\n",
"1 rows affected.\n",
"1 rows affected.\n"
@@ -7851,25 +4755,25 @@
" <th>prob_9</th>\n",
" </tr>\n",
" <tr>\n",
- " <td>5221</td>\n",
- " <td>1.0724234e-06</td>\n",
- " <td>1.4683914e-07</td>\n",
- " <td>1.5451868e-06</td>\n",
- " <td>2.83348e-07</td>\n",
- " <td>6.203704e-05</td>\n",
- " <td>4.6814375e-06</td>\n",
- " <td>6.654035e-09</td>\n",
- " <td>0.99993</td>\n",
- " <td>1.17486385e-08</td>\n",
- " <td>5.6579474e-08</td>\n",
+ " <td>4032</td>\n",
+ " <td>2.626629e-06</td>\n",
+ " <td>2.7014737e-08</td>\n",
+ " <td>0.0022699283</td>\n",
+ " <td>2.0414376e-05</td>\n",
+ " <td>0.99757725</td>\n",
+ " <td>1.5412388e-05</td>\n",
+ " <td>1.7638637e-05</td>\n",
+ " <td>9.5042335e-05</td>\n",
+ " <td>1.4481008e-06</td>\n",
+ " <td>5.417283e-08</td>\n",
" </tr>\n",
"</table>"
],
"text/plain": [
- "[(5221, 1.0724234e-06, 1.4683914e-07, 1.5451868e-06, 2.83348e-07, 6.203704e-05, 4.6814375e-06, 6.654035e-09, 0.99993, 1.17486385e-08, 5.6579474e-08)]"
+ "[(4032, 2.626629e-06, 2.7014737e-08, 0.0022699283, 2.0414376e-05, 0.99757725, 1.5412388e-05, 1.7638637e-05, 9.5042335e-05, 1.4481008e-06, 5.417283e-08)]"
]
},
- "execution_count": 20,
+ "execution_count": 22,
"metadata": {},
"output_type": "execute_result"
}
@@ -7900,14 +4804,13 @@
},
{
"cell_type": "code",
- "execution_count": 21,
+ "execution_count": 23,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
- " * postgresql://gpadmin@localhost:8000/cifar_places\n",
"Done.\n",
"1 rows affected.\n",
"1 rows affected.\n"
@@ -7921,15 +4824,15 @@
" <th>feature_vector</th>\n",
" </tr>\n",
" <tr>\n",
- " <td>[1.0724234e-06, 1.4683914e-07, 1.5451868e-06, 2.83348e-07, 6.203704e-05, 4.6814375e-06, 6.654035e-09, 0.99993, 1.17486385e-08, 5.6579474e-08]</td>\n",
+ " <td>[2.626629e-06, 2.7014737e-08, 0.0022699283, 2.0414376e-05, 0.99757725, 1.5412388e-05, 1.7638637e-05, 9.5042335e-05, 1.4481008e-06, 5.417283e-08]</td>\n",
" </tr>\n",
"</table>"
],
"text/plain": [
- "[([1.0724234e-06, 1.4683914e-07, 1.5451868e-06, 2.83348e-07, 6.203704e-05, 4.6814375e-06, 6.654035e-09, 0.99993, 1.17486385e-08, 5.6579474e-08],)]"
+ "[([2.626629e-06, 2.7014737e-08, 0.0022699283, 2.0414376e-05, 0.99757725, 1.5412388e-05, 1.7638637e-05, 9.5042335e-05, 1.4481008e-06, 5.417283e-08],)]"
]
},
- "execution_count": 21,
+ "execution_count": 23,
"metadata": {},
"output_type": "execute_result"
}
@@ -7948,24 +4851,23 @@
},
{
"cell_type": "code",
- "execution_count": 22,
+ "execution_count": 24,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
- " * postgresql://gpadmin@localhost:8000/cifar_places\n",
"1 rows affected.\n"
]
},
{
"data": {
"text/plain": [
- "<matplotlib.image.AxesImage at 0x15724d350>"
+ "<matplotlib.image.AxesImage at 0x1607c2710>"
]
},
- "execution_count": 22,
+ "execution_count": 24,
"metadata": {},
"output_type": "execute_result"
},
@@ -7973,17 +4875,16 @@
"name": "stdout",
"output_type": "stream",
"text": [
- " * postgresql://gpadmin@localhost:8000/cifar_places\n",
"1 rows affected.\n",
" \n",
- "horse 0.99993\n",
- "deer 6.203704e-05\n",
- "dog 4.6814375e-06\n"
+ "deer 0.99757725\n",
+ "bird 0.0022699283\n",
+ "horse 9.5042335e-05\n"
]
},
{
"data": {
- "image/png": "iVBORw0KGgoAAAANSUhEUgAAAP8AAAD8CAYAAAC4nHJkAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADl0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uIDIuMi41LCBodHRwOi8vbWF0cGxvdGxpYi5vcmcvSM8oowAAHs1JREFUeJztnVmMnNeV3/+n9qpmL2xSbFEkTWr1SPKipUV7RoJjz2LIxmBkIxPBejD0YAwHwRiIgcmD4ACxA+TBE8Q2/BA4oGNhNIHjJV5iIXASO/JklMkkkihbokhroylS3JpbL9XV3bWfPFQxodr3f7vJZldLc/8/gGD1PXW/e+vWd+qruv/vnGPuDiFEemQ2egJCiI1Bzi9Eosj5hUgUOb8QiSLnFyJR5PxCJIqcX4hEkfMLkShyfiESJbeWzmb2IICvAcgC+Hfu/qXY88e3bPUd [...]
+ "image/png": "iVBORw0KGgoAAAANSUhEUgAAAP8AAAD8CAYAAAC4nHJkAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADl0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uIDIuMi41LCBodHRwOi8vbWF0cGxvdGxpYi5vcmcvSM8oowAAHYVJREFUeJztnV2sZFeV3/+rTn3Xrdu3b7dtmraFjW08cSbBkJZFNGhEZjQjB41kkBIED8gPaHqUDFKQJpEsIgUi5YGJAoiHiKgJ1ngiwkcGEFaEkiHWSBYvHhrGGIMzMXhsxk27u91f96O+66w8VDlpN/u/bnXfvnVt9v8ntbru2bXPXmefs+rU2f9aa5m7QwiRH5X9NkAIsT/I+YXIFDm/EJki5xciU+T8QmSKnF+ITJHzC5Epcn4hMkXOL0SmVHfT2cweAPA5AAWA/+zun4re325V [...]
"text/plain": [
"<Figure size 432x288 with 1 Axes>"
]
@@ -8001,7 +4902,7 @@
"from matplotlib.pyplot import imshow\n",
"%matplotlib inline\n",
"x_np = np.array(x[0][0], dtype=np.uint8)\n",
- "imshow(x_np)\n",
+ "imshow(x_np);\n",
"\n",
"x = %sql SELECT * FROM cifar10_val_random_predict_array;\n",
"x = x.DataFrame().to_numpy()\n",