Skip to content

Commit

Permalink
Add files via upload
Browse files Browse the repository at this point in the history
  • Loading branch information
ypwhs committed Mar 24, 2017
1 parent 65e210d commit 63c70d1
Showing 1 changed file with 13 additions and 36 deletions.
49 changes: 13 additions & 36 deletions gap_train.ipynb
Expand Up @@ -13,7 +13,7 @@
"import h5py\n",
"import numpy as np\n",
"from sklearn.utils import shuffle\n",
"\n",
"np.random.seed(2017)\n",
"\n",
"X_train = []\n",
"X_test = []\n",
Expand All @@ -30,29 +30,6 @@
"X_train, y_train = shuffle(X_train, y_train)"
]
},
{
"cell_type": "code",
"execution_count": 11,
"metadata": {
"collapsed": false
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"train (25000, 2048)\n",
"test (12500, 2048)\n",
"label (25000,)\n"
]
}
],
"source": [
"with h5py.File(\"gap_ResNet50.h5\", 'r') as h:\n",
" for k in h.keys()[::-1]:\n",
" print k, h[k].shape"
]
},
{
"cell_type": "code",
"execution_count": 2,
Expand Down Expand Up @@ -101,9 +78,9 @@
"<g class=\"graph\" id=\"graph0\" transform=\"scale(1 1) rotate(0) translate(4 211)\">\n",
"<title>G</title>\n",
"<polygon fill=\"#ffffff\" points=\"-4,4 -4,-211 278.6797,-211 278.6797,4 -4,4\" stroke=\"transparent\"/>\n",
"<!-- 5929517776 -->\n",
"<!-- 5722972816 -->\n",
"<g class=\"node\" id=\"node1\">\n",
"<title>5929517776</title>\n",
"<title>5722972816</title>\n",
"<polygon fill=\"none\" points=\"0,-162.5 0,-206.5 274.6797,-206.5 274.6797,-162.5 0,-162.5\" stroke=\"#000000\"/>\n",
"<text fill=\"#000000\" font-family=\"Times,serif\" font-size=\"14.00\" text-anchor=\"middle\" x=\"64.1812\" y=\"-180.3\">input_1: InputLayer</text>\n",
"<polyline fill=\"none\" points=\"128.3623,-162.5 128.3623,-206.5 \" stroke=\"#000000\"/>\n",
Expand All @@ -115,9 +92,9 @@
"<polyline fill=\"none\" points=\"184.0313,-184.5 274.6797,-184.5 \" stroke=\"#000000\"/>\n",
"<text fill=\"#000000\" font-family=\"Times,serif\" font-size=\"14.00\" text-anchor=\"middle\" x=\"229.3555\" y=\"-169.3\">(None, 6144)</text>\n",
"</g>\n",
"<!-- 4549942800 -->\n",
"<!-- 4591509648 -->\n",
"<g class=\"node\" id=\"node2\">\n",
"<title>4549942800</title>\n",
"<title>4591509648</title>\n",
"<polygon fill=\"none\" points=\".3794,-81.5 .3794,-125.5 274.3003,-125.5 274.3003,-81.5 .3794,-81.5\" stroke=\"#000000\"/>\n",
"<text fill=\"#000000\" font-family=\"Times,serif\" font-size=\"14.00\" text-anchor=\"middle\" x=\"64.1812\" y=\"-99.3\">dropout_1: Dropout</text>\n",
"<polyline fill=\"none\" points=\"127.9829,-81.5 127.9829,-125.5 \" stroke=\"#000000\"/>\n",
Expand All @@ -129,15 +106,15 @@
"<polyline fill=\"none\" points=\"183.6519,-103.5 274.3003,-103.5 \" stroke=\"#000000\"/>\n",
"<text fill=\"#000000\" font-family=\"Times,serif\" font-size=\"14.00\" text-anchor=\"middle\" x=\"228.9761\" y=\"-88.3\">(None, 6144)</text>\n",
"</g>\n",
"<!-- 5929517776&#45;&gt;4549942800 -->\n",
"<!-- 5722972816&#45;&gt;4591509648 -->\n",
"<g class=\"edge\" id=\"edge1\">\n",
"<title>5929517776-&gt;4549942800</title>\n",
"<title>5722972816-&gt;4591509648</title>\n",
"<path d=\"M137.3398,-162.3664C137.3398,-154.1516 137.3398,-144.6579 137.3398,-135.7252\" fill=\"none\" stroke=\"#000000\"/>\n",
"<polygon fill=\"#000000\" points=\"140.8399,-135.6068 137.3398,-125.6068 133.8399,-135.6069 140.8399,-135.6068\" stroke=\"#000000\"/>\n",
"</g>\n",
"<!-- 4550109520 -->\n",
"<!-- 4343560784 -->\n",
"<g class=\"node\" id=\"node3\">\n",
"<title>4550109520</title>\n",
"<title>4343560784</title>\n",
"<polygon fill=\"none\" points=\"12.0552,-.5 12.0552,-44.5 262.6245,-44.5 262.6245,-.5 12.0552,-.5\" stroke=\"#000000\"/>\n",
"<text fill=\"#000000\" font-family=\"Times,serif\" font-size=\"14.00\" text-anchor=\"middle\" x=\"64.1812\" y=\"-18.3\">dense_1: Dense</text>\n",
"<polyline fill=\"none\" points=\"116.3071,-.5 116.3071,-44.5 \" stroke=\"#000000\"/>\n",
Expand All @@ -149,9 +126,9 @@
"<polyline fill=\"none\" points=\"171.9761,-22.5 262.6245,-22.5 \" stroke=\"#000000\"/>\n",
"<text fill=\"#000000\" font-family=\"Times,serif\" font-size=\"14.00\" text-anchor=\"middle\" x=\"217.3003\" y=\"-7.3\">(None, 1)</text>\n",
"</g>\n",
"<!-- 4549942800&#45;&gt;4550109520 -->\n",
"<!-- 4591509648&#45;&gt;4343560784 -->\n",
"<g class=\"edge\" id=\"edge2\">\n",
"<title>4549942800-&gt;4550109520</title>\n",
"<title>4591509648-&gt;4343560784</title>\n",
"<path d=\"M137.3398,-81.3664C137.3398,-73.1516 137.3398,-63.6579 137.3398,-54.7252\" fill=\"none\" stroke=\"#000000\"/>\n",
"<polygon fill=\"#000000\" points=\"140.8399,-54.6068 137.3398,-44.6068 133.8399,-54.6069 140.8399,-54.6068\" stroke=\"#000000\"/>\n",
"</g>\n",
Expand Down Expand Up @@ -210,7 +187,7 @@
{
"data": {
"text/plain": [
"<keras.callbacks.History at 0x16190fa90>"
"<keras.callbacks.History at 0x15541db90>"
]
},
"execution_count": 4,
Expand Down Expand Up @@ -248,7 +225,7 @@
"name": "stdout",
"output_type": "stream",
"text": [
"11936/12500 [===========================>..] - ETA: 0s"
"11968/12500 [===========================>..] - ETA: 0s"
]
}
],
Expand Down

0 comments on commit 63c70d1

Please sign in to comment.