ソースを参照

ready for global opt

Ravi Hegde 6 年 前
コミット
5c2211c4cd

+ 6 - 0
.ipynb_checkpoints/barplotting-checkpoint.ipynb

@@ -0,0 +1,6 @@
+{
+ "cells": [],
+ "metadata": {},
+ "nbformat": 4,
+ "nbformat_minor": 2
+}

+ 6 - 0
.ipynb_checkpoints/hypoptim-checkpoint.ipynb

@@ -0,0 +1,6 @@
+{
+ "cells": [],
+ "metadata": {},
+ "nbformat": 4,
+ "nbformat_minor": 2
+}

+ 177 - 0
.ipynb_checkpoints/mxmodel-checkpoint.ipynb

@@ -0,0 +1,177 @@
+{
+ "cells": [
+  {
+   "cell_type": "code",
+   "execution_count": 27,
+   "metadata": {
+    "ExecuteTime": {
+     "end_time": "2018-09-30T11:54:23.398548Z",
+     "start_time": "2018-09-30T11:54:23.169238Z"
+    }
+   },
+   "outputs": [
+    {
+     "data": {
+      "text/plain": [
+       "array([ 0.75,  0.9 ,  0.85,  0.35, -0.8 , -0.6 ,  0.8 ,  0.8 ])"
+      ]
+     },
+     "execution_count": 27,
+     "metadata": {},
+     "output_type": "execute_result"
+    }
+   ],
+   "source": [
+    "import h5py\n",
+    "from sklearn.model_selection import train_test_split\n",
+    "\n",
+    "#now load this dataset \n",
+    "h5f = h5py.File('./datasets/s8_sio2tio2_v2.h5','r')\n",
+    "X = h5f['sizes'][:]\n",
+    "Y = h5f['spectrum'][:]\n",
+    "\n",
+    "\n",
+    "#create a train - test split of the dataset\n",
+    "x_train, x_test, y_train, y_test = train_test_split(X, Y, test_size=0.4, random_state=42)\n",
+    "\n",
+    "# normalize inputs \n",
+    "x_test = (x_test - 50)/20 \n",
+    "\n",
+    "\n",
+    "\n"
+   ]
+  },
+  {
+   "cell_type": "code",
+   "execution_count": 23,
+   "metadata": {
+    "ExecuteTime": {
+     "end_time": "2018-09-30T11:45:01.118397Z",
+     "start_time": "2018-09-30T11:44:59.855736Z"
+    }
+   },
+   "outputs": [],
+   "source": [
+    "import numpy as np\n",
+    "import mxnet as mx\n",
+    "\n",
+    "# Step1: Load the model in MXNet\n",
+    "\n",
+    "# Use the same prefix and epoch parameters we used in save_mxnet_model API.\n",
+    "sym, arg_params, aux_params = mx.model.load_checkpoint(prefix='my_mod', epoch=0)\n",
+    "\n",
+    "# We use the data_names and data_shapes returned by save_mxnet_model API.\n",
+    "mod = mx.mod.Module(symbol=sym, \n",
+    "                    data_names=['/input_12'], \n",
+    "                    context=mx.gpu(1), \n",
+    "                    label_names=None)\n",
+    "mod.bind(for_training=False, \n",
+    "         data_shapes=[('/input_12', (1,8))], \n",
+    "         label_shapes=mod._label_shapes)\n",
+    "mod.set_params(arg_params, aux_params, allow_missing=True)                      "
+   ]
+  },
+  {
+   "cell_type": "code",
+   "execution_count": null,
+   "metadata": {},
+   "outputs": [],
+   "source": []
+  },
+  {
+   "cell_type": "code",
+   "execution_count": 25,
+   "metadata": {
+    "ExecuteTime": {
+     "end_time": "2018-09-30T11:47:00.407910Z",
+     "start_time": "2018-09-30T11:47:00.306416Z"
+    }
+   },
+   "outputs": [
+    {
+     "data": {
+      "text/plain": [
+       "gpu(1)"
+      ]
+     },
+     "execution_count": 25,
+     "metadata": {},
+     "output_type": "execute_result"
+    }
+   ],
+   "source": [
+    "size = np.random.randint(30, 71, (1,8))\n",
+    "#spec_ac = snlay.calc_spectrum(size, mats, lams)\n",
+    "size = (size - 50.0)/20.0\n",
+    "#size = np.expand_dims(size, axis = 0)\n",
+    "size.shape\n",
+    "#res1 = model.predict(size)\n",
+    "#data_iter = mx.io.NDArrayIter(size, None, 1)\n",
+    "for icv in np.arange(1000):\n",
+    "    res2 = mod.predict(size)\n",
+    "res2.context"
+   ]
+  },
+  {
+   "cell_type": "code",
+   "execution_count": 21,
+   "metadata": {
+    "ExecuteTime": {
+     "end_time": "2018-09-30T11:42:00.611085Z",
+     "start_time": "2018-09-30T11:42:00.601881Z"
+    }
+   },
+   "outputs": [
+    {
+     "data": {
+      "text/plain": [
+       "\n",
+       "[[0. 0. 0. 0.]\n",
+       " [0. 0. 0. 0.]\n",
+       " [0. 0. 0. 0.]]\n",
+       "<NDArray 3x4 @gpu(0)>"
+      ]
+     },
+     "execution_count": 21,
+     "metadata": {},
+     "output_type": "execute_result"
+    }
+   ],
+   "source": [
+    "import mxnet as mx\n",
+    "from mxnet import nd\n",
+    "mx.random.seed(1)\n",
+    "x = nd.empty((3, 4), ctx=mx.gpu(0))\n",
+    "x"
+   ]
+  },
+  {
+   "cell_type": "code",
+   "execution_count": null,
+   "metadata": {},
+   "outputs": [],
+   "source": []
+  }
+ ],
+ "metadata": {
+  "kernelspec": {
+   "display_name": "Python 3",
+   "language": "python",
+   "name": "python3"
+  },
+  "language_info": {
+   "codemirror_mode": {
+    "name": "ipython",
+    "version": 3
+   },
+   "file_extension": ".py",
+   "mimetype": "text/x-python",
+   "name": "python",
+   "nbconvert_exporter": "python",
+   "pygments_lexer": "ipython3",
+   "version": "3.5.6"
+  }
+ },
+ "nbformat": 4,
+ "nbformat_minor": 2
+}

BIN
__pycache__/hyptune.cpython-35.pyc


BIN
__pycache__/scnets.cpython-35.pyc


BIN
__pycache__/snlay.cpython-35.pyc


+ 84 - 0
barplotting.ipynb

@@ -0,0 +1,84 @@
+{
+ "cells": [
+  {
+   "cell_type": "code",
+   "execution_count": 1,
+   "metadata": {
+    "ExecuteTime": {
+     "end_time": "2018-09-30T16:27:30.263598Z",
+     "start_time": "2018-09-30T16:27:29.930319Z"
+    }
+   },
+   "outputs": [],
+   "source": [
+    "import numpy as np\n",
+    "import matplotlib.pyplot as plt\n",
+    "\n",
+    "# The data\n",
+    "resnet = np.asarray([0.8375262254326821, 0.8678992675159352, 0.8527975528611832, 0.8523278104598541, 0.884647507843369, 0.9665709773157553, \n",
+    "              0.941322385257967, 0.9607122054596926, 1.0446496050070293, 1.5978083756003671])\n",
+    "fully = np.asarray([0.2938374312588796, 0.3047676507445782, 0.29713952786808656, 0.3112794673912947, 0.335618492063216, 0.3853395053207258, \n",
+    "         0.40619997414669395, 0.43130068820046324, 0.5361458921673319, 0.6306651849357078])\n",
+    "\n",
+    "resnet = np.flip(resnet)\n",
+    "fully = np.flip(fully)\n",
+    "indices = range(len(resnet))\n",
+    "names = ['1x','1x','2x','3x','4x', '5x', '6x', '7x', '8x', '9x', '10x']\n",
+    "# Calculate optimal width\n",
+    "width = np.min(np.diff(indices))/3.\n",
+    "\n",
+    "fig = plt.figure(figsize=(5,2.5))\n",
+    "ax = fig.add_subplot(111)\n",
+    "ax.bar(indices-width/2.,resnet,width,color='b',label='resnet (D)')\n",
+    "ax.bar(indices+width/2.,fully,width,color='r',label='densenet (A)')\n",
+    "#tiks = ax.get_xticks().tolist()\n",
+    "#ax.axes.set_xticklabels(names)\n",
+    "plt.xticks(np.array([0, 1, 2, 3, 4, 5, 6, 7, 8, 9]), \n",
+    "               ('1', '2', '3', '4', '5',  '6', '7', '8', '9', '10'))\n",
+    "ax.set_xlabel('Training Data Size (multiples of 9K)')\n",
+    "ax.set_ylabel('Test MRE (%)')\n",
+    "ax.spines['top'].set_visible(False)\n",
+    "ax.spines['right'].set_visible(False)\n",
+    "ax.legend(loc=\"best\")\n",
+    "fig.savefig(\"datasize.pdf\", bbox_inches='tight')\n",
+    "#ax.spines['bottom'].set_visible(False)\n",
+    "#ax.spines['left'].set_visible(False)"
+   ]
+  },
+  {
+   "cell_type": "code",
+   "execution_count": null,
+   "metadata": {},
+   "outputs": [],
+   "source": []
+  },
+  {
+   "cell_type": "code",
+   "execution_count": null,
+   "metadata": {},
+   "outputs": [],
+   "source": []
+  }
+ ],
+ "metadata": {
+  "kernelspec": {
+   "display_name": "Python 3",
+   "language": "python",
+   "name": "python3"
+  },
+  "language_info": {
+   "codemirror_mode": {
+    "name": "ipython",
+    "version": 3
+   },
+   "file_extension": ".py",
+   "mimetype": "text/x-python",
+   "name": "python",
+   "nbconvert_exporter": "python",
+   "pygments_lexer": "ipython3",
+   "version": "3.5.6"
+  }
+ },
+ "nbformat": 4,
+ "nbformat_minor": 2
+}

ファイルの差分が大きいため隠しています
+ 251 - 0
hypoptim.ipynb


BIN
models/res15k_model.h5


+ 269 - 0
mxmodel.ipynb

@@ -0,0 +1,269 @@
+{
+ "cells": [
+  {
+   "cell_type": "code",
+   "execution_count": 1,
+   "metadata": {
+    "ExecuteTime": {
+     "end_time": "2018-09-30T16:20:36.613702Z",
+     "start_time": "2018-09-30T16:20:35.532595Z"
+    }
+   },
+   "outputs": [
+    {
+     "data": {
+      "text/plain": [
+       "array([67., 31., 30., 37., 56., 37., 61., 49.])"
+      ]
+     },
+     "execution_count": 1,
+     "metadata": {},
+     "output_type": "execute_result"
+    }
+   ],
+   "source": [
+    "import h5py\n",
+    "from sklearn.model_selection import train_test_split\n",
+    "\n",
+    "#now load this dataset \n",
+    "h5f = h5py.File('./datasets/s8_sio2tio2_v2.h5','r')\n",
+    "X = h5f['sizes'][:]\n",
+    "Y = h5f['spectrum'][:]\n",
+    "\n",
+    "\n",
+    "#create a train - test split of the dataset\n",
+    "x_train, x_test, y_train, y_test = train_test_split(X, Y, test_size=0.4, random_state=42)\n",
+    "\n",
+    "\n",
+    "\n",
+    "x_test[9]\n"
+   ]
+  },
+  {
+   "cell_type": "code",
+   "execution_count": 2,
+   "metadata": {
+    "ExecuteTime": {
+     "end_time": "2018-09-30T16:20:49.933501Z",
+     "start_time": "2018-09-30T16:20:45.837033Z"
+    }
+   },
+   "outputs": [],
+   "source": [
+    "import numpy as np\n",
+    "import mxnet as mx\n",
+    "\n",
+    "# Step1: Load the model in MXNet\n",
+    "\n",
+    "# Use the same prefix and epoch parameters we used in save_mxnet_model API.\n",
+    "sym, arg_params, aux_params = mx.model.load_checkpoint(prefix='my_mod', epoch=0)\n",
+    "\n",
+    "# We use the data_names and data_shapes returned by save_mxnet_model API.\n",
+    "mod = mx.mod.Module(symbol=sym, \n",
+    "                    data_names=['/input_12'], \n",
+    "                    context=mx.gpu(), \n",
+    "                    label_names=None)\n",
+    "mod.bind(for_training=False, \n",
+    "         data_shapes=[('/input_12', (1,8))], \n",
+    "         label_shapes=mod._label_shapes)\n",
+    "mod.set_params(arg_params, aux_params, allow_missing=True)                      "
+   ]
+  },
+  {
+   "cell_type": "code",
+   "execution_count": null,
+   "metadata": {},
+   "outputs": [],
+   "source": [
+    "\n"
+   ]
+  },
+  {
+   "cell_type": "code",
+   "execution_count": 4,
+   "metadata": {
+    "ExecuteTime": {
+     "end_time": "2018-09-30T16:21:01.661357Z",
+     "start_time": "2018-09-30T16:21:01.485033Z"
+    }
+   },
+   "outputs": [
+    {
+     "name": "stdout",
+     "output_type": "stream",
+     "text": [
+      "0.16714763641357422\n"
+     ]
+    }
+   ],
+   "source": [
+    "import scnets as scn\n",
+    "import mxnet as mx\n",
+    "from mxnet import nd\n",
+    "import time\n",
+    "\n",
+    "size = np.random.randint(30, 71, (1,8))\n",
+    "#spec_ac = snlay.calc_spectrum(size, mats, lams)\n",
+    "size = (size - 50.0)/20.0\n",
+    "#size = np.expand_dims(size, axis = 0)\n",
+    "size.shape\n",
+    "\n",
+    "y_true = nd.array(y_test[9], ctx=mx.gpu())\n",
+    "\n",
+    "reps = 1000\n",
+    "start = time.time()\n",
+    "#res1 = model.predict(size)\n",
+    "#data_iter = mx.io.NDArrayIter(size, None, 1)\n",
+    "for icv in np.arange(reps):\n",
+    "    size = np.random.randint(30, 71, (1,8))\n",
+    "    size = (size - 50.0)/20.0\n",
+    "    res2 = mod.predict(size)\n",
+    "    err = nd.abs(y_true - res2)/y_true\n",
+    "    finerr = nd.sum(err)\n",
+    "    \n",
+    "end = time.time()\n",
+    "print(1000*(end - start)/reps)   "
+   ]
+  },
+  {
+   "cell_type": "code",
+   "execution_count": 5,
+   "metadata": {
+    "ExecuteTime": {
+     "end_time": "2018-09-30T16:21:08.815235Z",
+     "start_time": "2018-09-30T16:21:08.809272Z"
+    }
+   },
+   "outputs": [],
+   "source": [
+    "import scnets as scn\n",
+    "import mxnet as mx\n",
+    "from mxnet import nd\n",
+    "def give_loss(x_in, y_true, mxmod):\n",
+    "    y_t = nd.array(y_true, ctx=mx.gpu())\n",
+    "    res2 = mxmod.predict(x_in)\n",
+    "    err = nd.abs(y_t - res2)/y_t\n",
+    "    err2 = nd.sum(err).asscalar()\n",
+    "    #ez2 = err2.copyto(mx.cpu())\n",
+    "    return err2\n",
+    "\n",
+    "#     err2cp = nd.zeros_like(err2, ctx=mx.cpu())"
+   ]
+  },
+  {
+   "cell_type": "code",
+   "execution_count": 11,
+   "metadata": {
+    "ExecuteTime": {
+     "end_time": "2018-09-30T16:49:04.385979Z",
+     "start_time": "2018-09-30T16:49:02.703408Z"
+    }
+   },
+   "outputs": [
+    {
+     "name": "stdout",
+     "output_type": "stream",
+     "text": [
+      "1.672537088394165\n"
+     ]
+    }
+   ],
+   "source": [
+    "size = np.random.randint(30, 71, (1,8))\n",
+    "#spec_ac = snlay.calc_spectrum(size, mats, lams)\n",
+    "size = (size - 50.0)/20.0\n",
+    "\n",
+    "ans = 1.00\n",
+    "cd = give_loss(x_in=size, y_true=y_test[6], mxmod=mod)\n",
+    "\n",
+    "\n",
+    "reps = 1000\n",
+    "start = time.time()\n",
+    "for icv in np.arange(reps):\n",
+    "    cc = give_loss(x_in=size, y_true=y_test[6], mxmod=mod)\n",
+    "    #ans = cc.asscalar()\n",
+    "\n",
+    "end = time.time()\n",
+    "print(1000*(end - start)/reps)   # "
+   ]
+  },
+  {
+   "cell_type": "code",
+   "execution_count": 8,
+   "metadata": {
+    "ExecuteTime": {
+     "end_time": "2018-09-30T16:21:45.903809Z",
+     "start_time": "2018-09-30T16:21:45.898205Z"
+    }
+   },
+   "outputs": [
+    {
+     "data": {
+      "text/plain": [
+       "248.17133"
+      ]
+     },
+     "execution_count": 8,
+     "metadata": {},
+     "output_type": "execute_result"
+    }
+   ],
+   "source": [
+    "cd"
+   ]
+  },
+  {
+   "cell_type": "code",
+   "execution_count": 124,
+   "metadata": {
+    "ExecuteTime": {
+     "end_time": "2018-09-30T15:58:44.524220Z",
+     "start_time": "2018-09-30T15:58:44.518399Z"
+    }
+   },
+   "outputs": [
+    {
+     "data": {
+      "text/plain": [
+       "1.0"
+      ]
+     },
+     "execution_count": 124,
+     "metadata": {},
+     "output_type": "execute_result"
+    }
+   ],
+   "source": [
+    "x.__getitem__(0).asscalar()"
+   ]
+  },
+  {
+   "cell_type": "code",
+   "execution_count": null,
+   "metadata": {},
+   "outputs": [],
+   "source": []
+  }
+ ],
+ "metadata": {
+  "kernelspec": {
+   "display_name": "Python 3",
+   "language": "python",
+   "name": "python3"
+  },
+  "language_info": {
+   "codemirror_mode": {
+    "name": "ipython",
+    "version": 3
+   },
+   "file_extension": ".py",
+   "mimetype": "text/x-python",
+   "name": "python",
+   "nbconvert_exporter": "python",
+   "pygments_lexer": "ipython3",
+   "version": "3.5.6"
+  }
+ },
+ "nbformat": 4,
+ "nbformat_minor": 2
+}

BIN
my_mod-0000.params


+ 494 - 0
my_mod-symbol.json

@@ -0,0 +1,494 @@
+{
+  "nodes": [
+    {
+      "op": "null", 
+      "name": "/input_12", 
+      "attrs": {
+        "__dtype__": "0", 
+        "__shape__": "(0, 8)"
+      }, 
+      "inputs": []
+    }, 
+    {
+      "op": "null", 
+      "name": "dense_1/kernel2", 
+      "attrs": {
+        "__dtype__": "0", 
+        "__shape__": "(8, 256)"
+      }, 
+      "inputs": []
+    }, 
+    {
+      "op": "dot", 
+      "name": "dot3", 
+      "inputs": [[0, 0, 0], [1, 0, 0]]
+    }, 
+    {
+      "op": "null", 
+      "name": "dense_1/bias2", 
+      "attrs": {
+        "__dtype__": "0", 
+        "__shape__": "(256,)"
+      }, 
+      "inputs": []
+    }, 
+    {
+      "op": "broadcast_add", 
+      "name": "broadcast_add17", 
+      "inputs": [[2, 0, 0], [3, 0, 0]]
+    }, 
+    {
+      "op": "LeakyReLU", 
+      "name": "leakyrelu9", 
+      "attrs": {
+        "act_type": "leaky", 
+        "slope": "0.0"
+      }, 
+      "inputs": [[4, 0, 0]]
+    }, 
+    {
+      "op": "null", 
+      "name": "p_re_lu_1/alpha2", 
+      "attrs": {
+        "__dtype__": "0", 
+        "__shape__": "(256,)"
+      }, 
+      "inputs": []
+    }, 
+    {
+      "op": "_mul_scalar", 
+      "name": "_mulscalar9", 
+      "attrs": {"scalar": "-1.0"}, 
+      "inputs": [[6, 0, 0]]
+    }, 
+    {
+      "op": "_mul_scalar", 
+      "name": "_mulscalar11", 
+      "attrs": {"scalar": "-1.0"}, 
+      "inputs": [[4, 0, 0]]
+    }, 
+    {
+      "op": "LeakyReLU", 
+      "name": "leakyrelu11", 
+      "attrs": {
+        "act_type": "leaky", 
+        "slope": "0.0"
+      }, 
+      "inputs": [[8, 0, 0]]
+    }, 
+    {
+      "op": "broadcast_mul", 
+      "name": "broadcast_mul5", 
+      "inputs": [[7, 0, 0], [9, 0, 0]]
+    }, 
+    {
+      "op": "broadcast_add", 
+      "name": "broadcast_add19", 
+      "inputs": [[5, 0, 0], [10, 0, 0]]
+    }, 
+    {
+      "op": "Reshape", 
+      "name": "reshape13", 
+      "attrs": {"shape": "(0, 8, 32)"}, 
+      "inputs": [[11, 0, 0]]
+    }, 
+    {
+      "op": "expand_dims", 
+      "name": "expand_dims17", 
+      "attrs": {"axis": "2"}, 
+      "inputs": [[12, 0, 0]]
+    }, 
+    {
+      "op": "transpose", 
+      "name": "transpose27", 
+      "attrs": {"axes": "[0, 3, 1, 2]"}, 
+      "inputs": [[13, 0, 0]]
+    }, 
+    {
+      "op": "null", 
+      "name": "conv1d_1/kernel2", 
+      "attrs": {
+        "__dtype__": "0", 
+        "__shape__": "(3, 32, 32)"
+      }, 
+      "inputs": []
+    }, 
+    {
+      "op": "expand_dims", 
+      "name": "expand_dims19", 
+      "attrs": {"axis": "1"}, 
+      "inputs": [[15, 0, 0]]
+    }, 
+    {
+      "op": "transpose", 
+      "name": "transpose28", 
+      "attrs": {"axes": "(3, 2, 0, 1)"}, 
+      "inputs": [[16, 0, 0]]
+    }, 
+    {
+      "op": "Convolution", 
+      "name": "conv1d_1/conv1d4", 
+      "attrs": {
+        "dilate": "(1, 1)", 
+        "kernel": "(3, 1)", 
+        "no_bias": "True", 
+        "num_filter": "32", 
+        "pad": "(1, 0)", 
+        "stride": "(1, 1)"
+      }, 
+      "inputs": [[14, 0, 0], [17, 0, 0]]
+    }, 
+    {
+      "op": "transpose", 
+      "name": "transpose29", 
+      "attrs": {"axes": "[0, 2, 3, 1]"}, 
+      "inputs": [[18, 0, 0]]
+    }, 
+    {
+      "op": "Reshape", 
+      "name": "reshape15", 
+      "attrs": {"shape": "(0, 8, 32)"}, 
+      "inputs": [[19, 0, 0]]
+    }, 
+    {
+      "op": "null", 
+      "name": "conv1d_1/bias2", 
+      "attrs": {
+        "__dtype__": "0", 
+        "__shape__": "(32,)"
+      }, 
+      "inputs": []
+    }, 
+    {
+      "op": "broadcast_add", 
+      "name": "broadcast_add21", 
+      "inputs": [[20, 0, 0], [21, 0, 0]]
+    }, 
+    {
+      "op": "LeakyReLU", 
+      "name": "leakyrelu13", 
+      "attrs": {
+        "act_type": "leaky", 
+        "slope": "0.0"
+      }, 
+      "inputs": [[22, 0, 0]]
+    }, 
+    {
+      "op": "expand_dims", 
+      "name": "expand_dims21", 
+      "attrs": {"axis": "2"}, 
+      "inputs": [[23, 0, 0]]
+    }, 
+    {
+      "op": "transpose", 
+      "name": "transpose33", 
+      "attrs": {"axes": "[0, 3, 1, 2]"}, 
+      "inputs": [[24, 0, 0]]
+    }, 
+    {
+      "op": "null", 
+      "name": "conv1d_2/kernel2", 
+      "attrs": {
+        "__dtype__": "0", 
+        "__shape__": "(3, 32, 32)"
+      }, 
+      "inputs": []
+    }, 
+    {
+      "op": "expand_dims", 
+      "name": "expand_dims23", 
+      "attrs": {"axis": "1"}, 
+      "inputs": [[26, 0, 0]]
+    }, 
+    {
+      "op": "transpose", 
+      "name": "transpose34", 
+      "attrs": {"axes": "(3, 2, 0, 1)"}, 
+      "inputs": [[27, 0, 0]]
+    }, 
+    {
+      "op": "Convolution", 
+      "name": "conv1d_2/conv1d4", 
+      "attrs": {
+        "dilate": "(1, 1)", 
+        "kernel": "(3, 1)", 
+        "no_bias": "True", 
+        "num_filter": "32", 
+        "pad": "(1, 0)", 
+        "stride": "(1, 1)"
+      }, 
+      "inputs": [[25, 0, 0], [28, 0, 0]]
+    }, 
+    {
+      "op": "transpose", 
+      "name": "transpose35", 
+      "attrs": {"axes": "[0, 2, 3, 1]"}, 
+      "inputs": [[29, 0, 0]]
+    }, 
+    {
+      "op": "Reshape", 
+      "name": "reshape17", 
+      "attrs": {"shape": "(0, 8, 32)"}, 
+      "inputs": [[30, 0, 0]]
+    }, 
+    {
+      "op": "null", 
+      "name": "conv1d_2/bias2", 
+      "attrs": {
+        "__dtype__": "0", 
+        "__shape__": "(32,)"
+      }, 
+      "inputs": []
+    }, 
+    {
+      "op": "broadcast_add", 
+      "name": "broadcast_add23", 
+      "inputs": [[31, 0, 0], [32, 0, 0]]
+    }, 
+    {
+      "op": "broadcast_add", 
+      "name": "broadcast_add25", 
+      "inputs": [[33, 0, 0], [12, 0, 0]]
+    }, 
+    {
+      "op": "expand_dims", 
+      "name": "expand_dims25", 
+      "attrs": {"axis": "2"}, 
+      "inputs": [[34, 0, 0]]
+    }, 
+    {
+      "op": "transpose", 
+      "name": "transpose39", 
+      "attrs": {"axes": "[0, 3, 1, 2]"}, 
+      "inputs": [[35, 0, 0]]
+    }, 
+    {
+      "op": "null", 
+      "name": "conv1d_3/kernel2", 
+      "attrs": {
+        "__dtype__": "0", 
+        "__shape__": "(3, 32, 32)"
+      }, 
+      "inputs": []
+    }, 
+    {
+      "op": "expand_dims", 
+      "name": "expand_dims27", 
+      "attrs": {"axis": "1"}, 
+      "inputs": [[37, 0, 0]]
+    }, 
+    {
+      "op": "transpose", 
+      "name": "transpose40", 
+      "attrs": {"axes": "(3, 2, 0, 1)"}, 
+      "inputs": [[38, 0, 0]]
+    }, 
+    {
+      "op": "Convolution", 
+      "name": "conv1d_3/conv1d4", 
+      "attrs": {
+        "dilate": "(1, 1)", 
+        "kernel": "(3, 1)", 
+        "no_bias": "True", 
+        "num_filter": "32", 
+        "pad": "(1, 0)", 
+        "stride": "(1, 1)"
+      }, 
+      "inputs": [[36, 0, 0], [39, 0, 0]]
+    }, 
+    {
+      "op": "transpose", 
+      "name": "transpose41", 
+      "attrs": {"axes": "[0, 2, 3, 1]"}, 
+      "inputs": [[40, 0, 0]]
+    }, 
+    {
+      "op": "Reshape", 
+      "name": "reshape19", 
+      "attrs": {"shape": "(0, 8, 32)"}, 
+      "inputs": [[41, 0, 0]]
+    }, 
+    {
+      "op": "null", 
+      "name": "conv1d_3/bias2", 
+      "attrs": {
+        "__dtype__": "0", 
+        "__shape__": "(32,)"
+      }, 
+      "inputs": []
+    }, 
+    {
+      "op": "broadcast_add", 
+      "name": "broadcast_add27", 
+      "inputs": [[42, 0, 0], [43, 0, 0]]
+    }, 
+    {
+      "op": "LeakyReLU", 
+      "name": "leakyrelu15", 
+      "attrs": {
+        "act_type": "leaky", 
+        "slope": "0.0"
+      }, 
+      "inputs": [[44, 0, 0]]
+    }, 
+    {
+      "op": "expand_dims", 
+      "name": "expand_dims29", 
+      "attrs": {"axis": "2"}, 
+      "inputs": [[45, 0, 0]]
+    }, 
+    {
+      "op": "transpose", 
+      "name": "transpose45", 
+      "attrs": {"axes": "[0, 3, 1, 2]"}, 
+      "inputs": [[46, 0, 0]]
+    }, 
+    {
+      "op": "null", 
+      "name": "conv1d_4/kernel2", 
+      "attrs": {
+        "__dtype__": "0", 
+        "__shape__": "(3, 32, 32)"
+      }, 
+      "inputs": []
+    }, 
+    {
+      "op": "expand_dims", 
+      "name": "expand_dims31", 
+      "attrs": {"axis": "1"}, 
+      "inputs": [[48, 0, 0]]
+    }, 
+    {
+      "op": "transpose", 
+      "name": "transpose46", 
+      "attrs": {"axes": "(3, 2, 0, 1)"}, 
+      "inputs": [[49, 0, 0]]
+    }, 
+    {
+      "op": "Convolution", 
+      "name": "conv1d_4/conv1d4", 
+      "attrs": {
+        "dilate": "(1, 1)", 
+        "kernel": "(3, 1)", 
+        "no_bias": "True", 
+        "num_filter": "32", 
+        "pad": "(1, 0)", 
+        "stride": "(1, 1)"
+      }, 
+      "inputs": [[47, 0, 0], [50, 0, 0]]
+    }, 
+    {
+      "op": "transpose", 
+      "name": "transpose47", 
+      "attrs": {"axes": "[0, 2, 3, 1]"}, 
+      "inputs": [[51, 0, 0]]
+    }, 
+    {
+      "op": "Reshape", 
+      "name": "reshape21", 
+      "attrs": {"shape": "(0, 8, 32)"}, 
+      "inputs": [[52, 0, 0]]
+    }, 
+    {
+      "op": "null", 
+      "name": "conv1d_4/bias2", 
+      "attrs": {
+        "__dtype__": "0", 
+        "__shape__": "(32,)"
+      }, 
+      "inputs": []
+    }, 
+    {
+      "op": "broadcast_add", 
+      "name": "broadcast_add29", 
+      "inputs": [[53, 0, 0], [54, 0, 0]]
+    }, 
+    {
+      "op": "broadcast_add", 
+      "name": "broadcast_add31", 
+      "inputs": [[55, 0, 0], [34, 0, 0]]
+    }, 
+    {
+      "op": "Flatten", 
+      "name": "flatten3", 
+      "inputs": [[56, 0, 0]]
+    }
+  ], 
+  "arg_nodes": [
+    0, 
+    1, 
+    3, 
+    6, 
+    15, 
+    21, 
+    26, 
+    32, 
+    37, 
+    43, 
+    48, 
+    54
+  ], 
+  "node_row_ptr": [
+    0, 
+    1, 
+    2, 
+    3, 
+    4, 
+    5, 
+    6, 
+    7, 
+    8, 
+    9, 
+    10, 
+    11, 
+    12, 
+    13, 
+    14, 
+    15, 
+    16, 
+    17, 
+    18, 
+    19, 
+    20, 
+    21, 
+    22, 
+    23, 
+    24, 
+    25, 
+    26, 
+    27, 
+    28, 
+    29, 
+    30, 
+    31, 
+    32, 
+    33, 
+    34, 
+    35, 
+    36, 
+    37, 
+    38, 
+    39, 
+    40, 
+    41, 
+    42, 
+    43, 
+    44, 
+    45, 
+    46, 
+    47, 
+    48, 
+    49, 
+    50, 
+    51, 
+    52, 
+    53, 
+    54, 
+    55, 
+    56, 
+    57, 
+    58
+  ], 
+  "heads": [[57, 0, 0]], 
+  "attrs": {"mxnet_version": ["int", 10300]}
+}

BIN
results/conv1d.pdf


BIN
results/convprel.pdf


BIN
results/datasize.pdf


BIN
results/foo2.pdf


BIN
results/fully.pdf


BIN
results/grid_figure.pdf


BIN
results/longepochs.pdf


BIN
results/model.png


BIN
results/model_resnet.png


+ 148 - 0
results/model_resnet.svg

@@ -0,0 +1,148 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN"
+ "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
+<!-- Generated by graphviz version 2.38.0 (20140413.2041)
+ -->
+<!-- Title: G Pages: 1 -->
+<svg width="120pt" height="921pt"
+ viewBox="0.00 0.00 119.50 921.00" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
+<g id="graph0" class="graph" transform="scale(1 1) rotate(0) translate(4 917)">
+<title>G</title>
+<polygon fill="white" stroke="none" points="-4,4 -4,-917 115.5,-917 115.5,4 -4,4"/>
+<!-- 140387210274520 -->
+<g id="node1" class="node"><title>140387210274520</title>
+<polygon fill="none" stroke="black" points="34.5,-876.5 34.5,-912.5 111.5,-912.5 111.5,-876.5 34.5,-876.5"/>
+<text text-anchor="middle" x="73" y="-890.8" font-family="Times,serif" font-size="14.00">InputLayer</text>
+</g>
+<!-- 140387210275360 -->
+<g id="node2" class="node"><title>140387210275360</title>
+<polygon fill="none" stroke="black" points="46,-803.5 46,-839.5 100,-839.5 100,-803.5 46,-803.5"/>
+<text text-anchor="middle" x="73" y="-817.8" font-family="Times,serif" font-size="14.00">Dense</text>
+</g>
+<!-- 140387210274520&#45;&gt;140387210275360 -->
+<g id="edge1" class="edge"><title>140387210274520&#45;&gt;140387210275360</title>
+<path fill="none" stroke="black" d="M73,-876.313C73,-868.289 73,-858.547 73,-849.569"/>
+<polygon fill="black" stroke="black" points="76.5001,-849.529 73,-839.529 69.5001,-849.529 76.5001,-849.529"/>
+</g>
+<!-- 140387210275528 -->
+<g id="node3" class="node"><title>140387210275528</title>
+<polygon fill="none" stroke="black" points="44.5,-730.5 44.5,-766.5 101.5,-766.5 101.5,-730.5 44.5,-730.5"/>
+<text text-anchor="middle" x="73" y="-744.8" font-family="Times,serif" font-size="14.00">PReLU</text>
+</g>
+<!-- 140387210275360&#45;&gt;140387210275528 -->
+<g id="edge2" class="edge"><title>140387210275360&#45;&gt;140387210275528</title>
+<path fill="none" stroke="black" d="M73,-803.313C73,-795.289 73,-785.547 73,-776.569"/>
+<polygon fill="black" stroke="black" points="76.5001,-776.529 73,-766.529 69.5001,-776.529 76.5001,-776.529"/>
+</g>
+<!-- 140387210396840 -->
+<g id="node4" class="node"><title>140387210396840</title>
+<polygon fill="none" stroke="black" points="42,-657.5 42,-693.5 104,-693.5 104,-657.5 42,-657.5"/>
+<text text-anchor="middle" x="73" y="-671.8" font-family="Times,serif" font-size="14.00">Reshape</text>
+</g>
+<!-- 140387210275528&#45;&gt;140387210396840 -->
+<g id="edge3" class="edge"><title>140387210275528&#45;&gt;140387210396840</title>
+<path fill="none" stroke="black" d="M73,-730.313C73,-722.289 73,-712.547 73,-703.569"/>
+<polygon fill="black" stroke="black" points="76.5001,-703.529 73,-693.529 69.5001,-703.529 76.5001,-703.529"/>
+</g>
+<!-- 140387210276368 -->
+<g id="node5" class="node"><title>140387210276368</title>
+<polygon fill="none" stroke="black" points="10,-584.5 10,-620.5 72,-620.5 72,-584.5 10,-584.5"/>
+<text text-anchor="middle" x="41" y="-598.8" font-family="Times,serif" font-size="14.00">Conv1D</text>
+</g>
+<!-- 140387210396840&#45;&gt;140387210276368 -->
+<g id="edge4" class="edge"><title>140387210396840&#45;&gt;140387210276368</title>
+<path fill="none" stroke="black" d="M65.2537,-657.313C61.5196,-649.028 56.9596,-638.91 52.8055,-629.693"/>
+<polygon fill="black" stroke="black" points="55.9749,-628.207 48.675,-620.529 49.5931,-631.084 55.9749,-628.207"/>
+</g>
+<!-- 140387210936504 -->
+<g id="node8" class="node"><title>140387210936504</title>
+<polygon fill="none" stroke="black" points="45,-365.5 45,-401.5 99,-401.5 99,-365.5 45,-365.5"/>
+<text text-anchor="middle" x="72" y="-379.8" font-family="Times,serif" font-size="14.00">Add</text>
+</g>
+<!-- 140387210396840&#45;&gt;140387210936504 -->
+<g id="edge8" class="edge"><title>140387210396840&#45;&gt;140387210936504</title>
+<path fill="none" stroke="black" d="M76.0668,-657.21C77.8,-646.76 79.8449,-633.154 81,-621 88.695,-540.032 89.4328,-518.895 81,-438 80.1074,-429.437 78.7048,-420.168 77.2702,-411.79"/>
+<polygon fill="black" stroke="black" points="80.6839,-410.997 75.4719,-401.773 73.794,-412.234 80.6839,-410.997"/>
+</g>
+<!-- 140387210275584 -->
+<g id="node6" class="node"><title>140387210275584</title>
+<polygon fill="none" stroke="black" points="1,-511.5 1,-547.5 75,-547.5 75,-511.5 1,-511.5"/>
+<text text-anchor="middle" x="38" y="-525.8" font-family="Times,serif" font-size="14.00">Activation</text>
+</g>
+<!-- 140387210276368&#45;&gt;140387210275584 -->
+<g id="edge5" class="edge"><title>140387210276368&#45;&gt;140387210275584</title>
+<path fill="none" stroke="black" d="M40.2738,-584.313C39.9348,-576.289 39.5231,-566.547 39.1438,-557.569"/>
+<polygon fill="black" stroke="black" points="42.6387,-557.372 38.7195,-547.529 35.6449,-557.668 42.6387,-557.372"/>
+</g>
+<!-- 140387210939920 -->
+<g id="node7" class="node"><title>140387210939920</title>
+<polygon fill="none" stroke="black" points="10,-438.5 10,-474.5 72,-474.5 72,-438.5 10,-438.5"/>
+<text text-anchor="middle" x="41" y="-452.8" font-family="Times,serif" font-size="14.00">Conv1D</text>
+</g>
+<!-- 140387210275584&#45;&gt;140387210939920 -->
+<g id="edge6" class="edge"><title>140387210275584&#45;&gt;140387210939920</title>
+<path fill="none" stroke="black" d="M38.7262,-511.313C39.0652,-503.289 39.4769,-493.547 39.8562,-484.569"/>
+<polygon fill="black" stroke="black" points="43.3551,-484.668 40.2805,-474.529 36.3613,-484.372 43.3551,-484.668"/>
+</g>
+<!-- 140387210939920&#45;&gt;140387210936504 -->
+<g id="edge7" class="edge"><title>140387210939920&#45;&gt;140387210936504</title>
+<path fill="none" stroke="black" d="M48.5042,-438.313C52.0836,-430.115 56.4462,-420.123 60.4363,-410.985"/>
+<polygon fill="black" stroke="black" points="63.771,-412.094 64.5649,-401.529 57.3558,-409.293 63.771,-412.094"/>
+</g>
+<!-- 140387210289504 -->
+<g id="node9" class="node"><title>140387210289504</title>
+<polygon fill="none" stroke="black" points="9,-292.5 9,-328.5 71,-328.5 71,-292.5 9,-292.5"/>
+<text text-anchor="middle" x="40" y="-306.8" font-family="Times,serif" font-size="14.00">Conv1D</text>
+</g>
+<!-- 140387210936504&#45;&gt;140387210289504 -->
+<g id="edge9" class="edge"><title>140387210936504&#45;&gt;140387210289504</title>
+<path fill="none" stroke="black" d="M64.2537,-365.313C60.5196,-357.028 55.9596,-346.91 51.8055,-337.693"/>
+<polygon fill="black" stroke="black" points="54.9749,-336.207 47.675,-328.529 48.5931,-339.084 54.9749,-336.207"/>
+</g>
+<!-- 140387210938968 -->
+<g id="node12" class="node"><title>140387210938968</title>
+<polygon fill="none" stroke="black" points="44,-73.5 44,-109.5 98,-109.5 98,-73.5 44,-73.5"/>
+<text text-anchor="middle" x="71" y="-87.8" font-family="Times,serif" font-size="14.00">Add</text>
+</g>
+<!-- 140387210936504&#45;&gt;140387210938968 -->
+<g id="edge13" class="edge"><title>140387210936504&#45;&gt;140387210938968</title>
+<path fill="none" stroke="black" d="M75.0668,-365.21C76.8,-354.76 78.8449,-341.154 80,-329 87.695,-248.032 88.4328,-226.895 80,-146 79.1074,-137.437 77.7048,-128.168 76.2702,-119.79"/>
+<polygon fill="black" stroke="black" points="79.6839,-118.997 74.4719,-109.773 72.794,-120.234 79.6839,-118.997"/>
+</g>
+<!-- 140387210289840 -->
+<g id="node10" class="node"><title>140387210289840</title>
+<polygon fill="none" stroke="black" points="0,-219.5 0,-255.5 74,-255.5 74,-219.5 0,-219.5"/>
+<text text-anchor="middle" x="37" y="-233.8" font-family="Times,serif" font-size="14.00">Activation</text>
+</g>
+<!-- 140387210289504&#45;&gt;140387210289840 -->
+<g id="edge10" class="edge"><title>140387210289504&#45;&gt;140387210289840</title>
+<path fill="none" stroke="black" d="M39.2738,-292.313C38.9348,-284.289 38.5231,-274.547 38.1438,-265.569"/>
+<polygon fill="black" stroke="black" points="41.6387,-265.372 37.7195,-255.529 34.6449,-265.668 41.6387,-265.372"/>
+</g>
+<!-- 140384853547776 -->
+<g id="node11" class="node"><title>140384853547776</title>
+<polygon fill="none" stroke="black" points="9,-146.5 9,-182.5 71,-182.5 71,-146.5 9,-146.5"/>
+<text text-anchor="middle" x="40" y="-160.8" font-family="Times,serif" font-size="14.00">Conv1D</text>
+</g>
+<!-- 140387210289840&#45;&gt;140384853547776 -->
+<g id="edge11" class="edge"><title>140387210289840&#45;&gt;140384853547776</title>
+<path fill="none" stroke="black" d="M37.7262,-219.313C38.0652,-211.289 38.4769,-201.547 38.8562,-192.569"/>
+<polygon fill="black" stroke="black" points="42.3551,-192.668 39.2805,-182.529 35.3613,-192.372 42.3551,-192.668"/>
+</g>
+<!-- 140384853547776&#45;&gt;140387210938968 -->
+<g id="edge12" class="edge"><title>140384853547776&#45;&gt;140387210938968</title>
+<path fill="none" stroke="black" d="M47.5042,-146.313C51.0836,-138.115 55.4462,-128.123 59.4363,-118.985"/>
+<polygon fill="black" stroke="black" points="62.771,-120.094 63.5649,-109.529 56.3558,-117.293 62.771,-120.094"/>
+</g>
+<!-- 140387210275864 -->
+<g id="node13" class="node"><title>140387210275864</title>
+<polygon fill="none" stroke="black" points="44,-0.5 44,-36.5 98,-36.5 98,-0.5 44,-0.5"/>
+<text text-anchor="middle" x="71" y="-14.8" font-family="Times,serif" font-size="14.00">Flatten</text>
+</g>
+<!-- 140387210938968&#45;&gt;140387210275864 -->
+<g id="edge14" class="edge"><title>140387210938968&#45;&gt;140387210275864</title>
+<path fill="none" stroke="black" d="M71,-73.3129C71,-65.2895 71,-55.5475 71,-46.5691"/>
+<polygon fill="black" stroke="black" points="74.5001,-46.5288 71,-36.5288 67.5001,-46.5289 74.5001,-46.5288"/>
+</g>
+</g>
+</svg>

BIN
results/resnet.pdf


この差分においてかなりの量のファイルが変更されているため、一部のファイルを表示していません