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 a283758 update Load-model-architecture-v1.ipynb with faster way to
load model weights - minor fix
a283758 is described below
commit a283758e9439f36b4b1334fb27d55049d71d7457
Author: Frank McQuillan <[email protected]>
AuthorDate: Tue Aug 20 16:20:45 2019 -0700
update Load-model-architecture-v1.ipynb with faster way to load model
weights - minor fix
---
.../Deep-learning/Load-model-architecture-v1.ipynb | 108 ++++++++++++++-------
1 file changed, 74 insertions(+), 34 deletions(-)
diff --git a/community-artifacts/Deep-learning/Load-model-architecture-v1.ipynb
b/community-artifacts/Deep-learning/Load-model-architecture-v1.ipynb
index 4a8a5d5..0cb9fa6 100644
--- a/community-artifacts/Deep-learning/Load-model-architecture-v1.ipynb
+++ b/community-artifacts/Deep-learning/Load-model-architecture-v1.ipynb
@@ -25,17 +25,15 @@
},
{
"cell_type": "code",
- "execution_count": 1,
+ "execution_count": 2,
"metadata": {},
"outputs": [
{
- "name": "stderr",
+ "name": "stdout",
"output_type": "stream",
"text": [
-
"/Users/fmcquillan/anaconda/lib/python2.7/site-packages/IPython/config.py:13:
ShimWarning: The `IPython.config` package has been deprecated since IPython
4.0. You should import from traitlets.config instead.\n",
- " \"You should import from traitlets.config instead.\", ShimWarning)\n",
-
"/Users/fmcquillan/anaconda/lib/python2.7/site-packages/IPython/utils/traitlets.py:5:
UserWarning: IPython.utils.traitlets has moved to a top-level traitlets
package.\n",
- " warn(\"IPython.utils.traitlets has moved to a top-level traitlets
package.\")\n"
+ "The sql extension is already loaded. To reload it, use:\n",
+ " %reload_ext sql\n"
]
}
],
@@ -45,7 +43,7 @@
},
{
"cell_type": "code",
- "execution_count": 2,
+ "execution_count": 3,
"metadata": {},
"outputs": [
{
@@ -54,7 +52,7 @@
"u'Connected: gpadmin@madlib'"
]
},
- "execution_count": 2,
+ "execution_count": 3,
"metadata": {},
"output_type": "execute_result"
}
@@ -72,7 +70,7 @@
},
{
"cell_type": "code",
- "execution_count": 3,
+ "execution_count": 4,
"metadata": {},
"outputs": [
{
@@ -98,7 +96,7 @@
"[(u'MADlib version: 1.17-dev, git revision: rel/v1.16-10-g205bdba,
cmake configuration time: Thu Aug 15 17:53:15 UTC 2019, build type: release,
build system: Linux-3.10.0-957.21.3.el7.x86_64, C compiler: gcc 4.8.5, C++
compiler: g++ 4.8.5',)]"
]
},
- "execution_count": 3,
+ "execution_count": 4,
"metadata": {},
"output_type": "execute_result"
}
@@ -120,7 +118,7 @@
},
{
"cell_type": "code",
- "execution_count": 4,
+ "execution_count": 5,
"metadata": {},
"outputs": [
{
@@ -153,7 +151,7 @@
},
{
"cell_type": "code",
- "execution_count": 5,
+ "execution_count": 6,
"metadata": {},
"outputs": [
{
@@ -187,7 +185,7 @@
},
{
"cell_type": "code",
- "execution_count": 6,
+ "execution_count": 7,
"metadata": {},
"outputs": [
{
@@ -196,7 +194,7 @@
"'{\"class_name\": \"Sequential\", \"keras_version\": \"2.1.6\",
\"config\": [{\"class_name\": \"Dense\", \"config\": {\"kernel_initializer\":
{\"class_name\": \"VarianceScaling\", \"config\": {\"distribution\":
\"uniform\", \"scale\": 1.0, \"seed\": null, \"mode\": \"fan_avg\"}}, \"name\":
\"dense_1\", \"kernel_constraint\": null, \"bias_regularizer\": null,
\"bias_constraint\": null, \"dtype\": \"float32\", \"activation\": \"relu\",
\"trainable\": true, \"kernel_regularizer\": n [...]
]
},
- "execution_count": 6,
+ "execution_count": 7,
"metadata": {},
"output_type": "execute_result"
}
@@ -225,7 +223,7 @@
},
{
"cell_type": "code",
- "execution_count": 7,
+ "execution_count": 8,
"metadata": {},
"outputs": [
{
@@ -255,15 +253,15 @@
" <td>None</td>\n",
" <td>Sophie</td>\n",
" <td>A simple model</td>\n",
- " <td>__madlib_temp_16223038_1566342412_31364249__</td>\n",
+ " <td>__madlib_temp_76404198_1566343068_55991799__</td>\n",
" </tr>\n",
"</table>"
],
"text/plain": [
- "[(1, {u'class_name': u'Sequential', u'keras_version': u'2.1.6',
u'config': [{u'class_name': u'Dense', u'config': {u'kernel_initializer':
{u'class_name': u'VarianceScaling', u'config': {u'distribution': u'uniform',
u'scale': 1.0, u'seed': None, u'mode': u'fan_avg'}}, u'name': u'dense_1',
u'kernel_constraint': None, u'bias_regularizer': None, u'bias_constraint':
None, u'dtype': u'float32', u'activation': u'relu', u'trainable': True,
u'kernel_regularizer': None, u'bias_initializer': [...]
+ "[(1, {u'class_name': u'Sequential', u'keras_version': u'2.1.6',
u'config': [{u'class_name': u'Dense', u'config': {u'kernel_initializer':
{u'class_name': u'VarianceScaling', u'config': {u'distribution': u'uniform',
u'scale': 1.0, u'seed': None, u'mode': u'fan_avg'}}, u'name': u'dense_1',
u'kernel_constraint': None, u'bias_regularizer': None, u'bias_constraint':
None, u'dtype': u'float32', u'activation': u'relu', u'trainable': True,
u'kernel_regularizer': None, u'bias_initializer': [...]
]
},
- "execution_count": 7,
+ "execution_count": 8,
"metadata": {},
"output_type": "execute_result"
}
@@ -294,7 +292,7 @@
},
{
"cell_type": "code",
- "execution_count": 8,
+ "execution_count": 9,
"metadata": {},
"outputs": [
{
@@ -318,29 +316,29 @@
" <th>__internal_madlib_id__</th>\n",
" </tr>\n",
" <tr>\n",
- " <td>2</td>\n",
+ " <td>1</td>\n",
" <td>{u'class_name': u'Sequential', u'keras_version': u'2.1.6',
u'config': [{u'class_name': u'Dense', u'config': {u'kernel_initializer':
{u'class_name': u'VarianceScaling', u'config': {u'distribution': u'uniform',
u'scale': 1.0, u'seed': None, u'mode': u'fan_avg'}}, u'name': u'dense_1',
u'kernel_constraint': None, u'bias_regularizer': None, u'bias_constraint':
None, u'dtype': u'float32', u'activation': u'relu', u'trainable': True,
u'kernel_regularizer': None, u'bias_initia [...]
" <td>None</td>\n",
- " <td>Maria</td>\n",
- " <td>Also a simple model</td>\n",
- " <td>__madlib_temp_43018550_1566342414_433620__</td>\n",
+ " <td>Sophie</td>\n",
+ " <td>A simple model</td>\n",
+ " <td>__madlib_temp_76404198_1566343068_55991799__</td>\n",
" </tr>\n",
" <tr>\n",
- " <td>1</td>\n",
+ " <td>2</td>\n",
" <td>{u'class_name': u'Sequential', u'keras_version': u'2.1.6',
u'config': [{u'class_name': u'Dense', u'config': {u'kernel_initializer':
{u'class_name': u'VarianceScaling', u'config': {u'distribution': u'uniform',
u'scale': 1.0, u'seed': None, u'mode': u'fan_avg'}}, u'name': u'dense_1',
u'kernel_constraint': None, u'bias_regularizer': None, u'bias_constraint':
None, u'dtype': u'float32', u'activation': u'relu', u'trainable': True,
u'kernel_regularizer': None, u'bias_initia [...]
" <td>None</td>\n",
- " <td>Sophie</td>\n",
- " <td>A simple model</td>\n",
- " <td>__madlib_temp_16223038_1566342412_31364249__</td>\n",
+ " <td>Maria</td>\n",
+ " <td>Also a simple model</td>\n",
+ " <td>__madlib_temp_9313391_1566343069_44328817__</td>\n",
" </tr>\n",
"</table>"
],
"text/plain": [
- "[(2, {u'class_name': u'Sequential', u'keras_version': u'2.1.6',
u'config': [{u'class_name': u'Dense', u'config': {u'kernel_initializer':
{u'class_name': u'VarianceScaling', u'config': {u'distribution': u'uniform',
u'scale': 1.0, u'seed': None, u'mode': u'fan_avg'}}, u'name': u'dense_1',
u'kernel_constraint': None, u'bias_regularizer': None, u'bias_constraint':
None, u'dtype': u'float32', u'activation': u'relu', u'trainable': True,
u'kernel_regularizer': None, u'bias_initializer': [...]
- " (1, {u'class_name': u'Sequential', u'keras_version': u'2.1.6',
u'config': [{u'class_name': u'Dense', u'config': {u'kernel_initializer':
{u'class_name': u'VarianceScaling', u'config': {u'distribution': u'uniform',
u'scale': 1.0, u'seed': None, u'mode': u'fan_avg'}}, u'name': u'dense_1',
u'kernel_constraint': None, u'bias_regularizer': None, u'bias_constraint':
None, u'dtype': u'float32', u'activation': u'relu', u'trainable': True,
u'kernel_regularizer': None, u'bias_initializer': [...]
+ "[(1, {u'class_name': u'Sequential', u'keras_version': u'2.1.6',
u'config': [{u'class_name': u'Dense', u'config': {u'kernel_initializer':
{u'class_name': u'VarianceScaling', u'config': {u'distribution': u'uniform',
u'scale': 1.0, u'seed': None, u'mode': u'fan_avg'}}, u'name': u'dense_1',
u'kernel_constraint': None, u'bias_regularizer': None, u'bias_constraint':
None, u'dtype': u'float32', u'activation': u'relu', u'trainable': True,
u'kernel_regularizer': None, u'bias_initializer': [...]
+ " (2, {u'class_name': u'Sequential', u'keras_version': u'2.1.6',
u'config': [{u'class_name': u'Dense', u'config': {u'kernel_initializer':
{u'class_name': u'VarianceScaling', u'config': {u'distribution': u'uniform',
u'scale': 1.0, u'seed': None, u'mode': u'fan_avg'}}, u'name': u'dense_1',
u'kernel_constraint': None, u'bias_regularizer': None, u'bias_constraint':
None, u'dtype': u'float32', u'activation': u'relu', u'trainable': True,
u'kernel_regularizer': None, u'bias_initializer': [...]
]
},
- "execution_count": 8,
+ "execution_count": 9,
"metadata": {},
"output_type": "execute_result"
}
@@ -376,7 +374,7 @@
},
{
"cell_type": "code",
- "execution_count": 9,
+ "execution_count": 10,
"metadata": {},
"outputs": [
{
@@ -392,7 +390,7 @@
"[]"
]
},
- "execution_count": 9,
+ "execution_count": 10,
"metadata": {},
"output_type": "execute_result"
}
@@ -513,12 +511,12 @@
" <th>count</th>\n",
" </tr>\n",
" <tr>\n",
- " <td>3</td>\n",
+ " <td>2</td>\n",
" </tr>\n",
"</table>"
],
"text/plain": [
- "[(3L,)]"
+ "[(2L,)]"
]
},
"execution_count": 11,
@@ -562,6 +560,48 @@
"<a id=\"delete_model\"></a>\n",
"# 4. Delete model"
]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 12,
+ "metadata": {},
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "1 rows affected.\n",
+ "1 rows affected.\n"
+ ]
+ },
+ {
+ "data": {
+ "text/html": [
+ "<table>\n",
+ " <tr>\n",
+ " <th>count</th>\n",
+ " </tr>\n",
+ " <tr>\n",
+ " <td>2</td>\n",
+ " </tr>\n",
+ "</table>"
+ ],
+ "text/plain": [
+ "[(2L,)]"
+ ]
+ },
+ "execution_count": 12,
+ "metadata": {},
+ "output_type": "execute_result"
+ }
+ ],
+ "source": [
+ "%%sql\n",
+ "SELECT madlib.delete_keras_model('model_arch_library', -- Output
table\n",
+ " 1 -- Model id\n",
+ " );\n",
+ "SELECT COUNT(*) FROM model_arch_library;"
+ ]
}
],
"metadata": {