This commit is contained in:
REDMOND\sayanpa 2017-04-26 19:50:33 -07:00
Родитель 244aa602bd
Коммит 95c755ec04
1 изменённых файлов: 64 добавлений и 75 удалений

Просмотреть файл

@ -60,10 +60,10 @@
"name": "stdout",
"output_type": "stream",
"text": [
"Reusing locally cached: atis.train.ctf\n",
"Reusing locally cached: atis.test.ctf\n",
"Reusing locally cached: slots.wl\n",
"Reusing locally cached: query.wl\n"
"Reusing locally cached: atis.train.ctf\n",
"Reusing locally cached: query.wl\n",
"Reusing locally cached: slots.wl\n"
]
}
],
@ -138,7 +138,7 @@
},
{
"cell_type": "code",
"execution_count": null,
"execution_count": 3,
"metadata": {
"collapsed": true
},
@ -229,7 +229,7 @@
},
{
"cell_type": "code",
"execution_count": 3,
"execution_count": 4,
"metadata": {
"collapsed": false
},
@ -272,7 +272,7 @@
},
{
"cell_type": "code",
"execution_count": 4,
"execution_count": 5,
"metadata": {
"collapsed": false
},
@ -311,7 +311,7 @@
},
{
"cell_type": "code",
"execution_count": 5,
"execution_count": 6,
"metadata": {
"collapsed": false
},
@ -374,7 +374,7 @@
},
{
"cell_type": "code",
"execution_count": 6,
"execution_count": 7,
"metadata": {
"collapsed": true
},
@ -390,7 +390,7 @@
},
{
"cell_type": "code",
"execution_count": 7,
"execution_count": 8,
"metadata": {
"collapsed": false
},
@ -398,10 +398,10 @@
{
"data": {
"text/plain": [
"dict_keys(['slot_labels', 'intent_unused', 'query'])"
"dict_keys(['intent_unused', 'query', 'slot_labels'])"
]
},
"execution_count": 7,
"execution_count": 8,
"metadata": {},
"output_type": "execute_result"
}
@ -429,7 +429,7 @@
},
{
"cell_type": "code",
"execution_count": 8,
"execution_count": 9,
"metadata": {
"collapsed": false
},
@ -440,7 +440,7 @@
"Composite(Combine): Input('Input2293', [#, *], [129]), Placeholder('labels', [???], [???]) -> Output('Block2263_Output_0', [#, *], [1]), Output('Block2283_Output_0', [#, *], [])"
]
},
"execution_count": 8,
"execution_count": 9,
"metadata": {},
"output_type": "execute_result"
}
@ -465,7 +465,7 @@
},
{
"cell_type": "code",
"execution_count": 9,
"execution_count": 10,
"metadata": {
"collapsed": true
},
@ -479,7 +479,7 @@
},
{
"cell_type": "code",
"execution_count": 10,
"execution_count": 11,
"metadata": {
"collapsed": false
},
@ -502,7 +502,7 @@
" # do other stuff (e.g. checkpointing, adjust learning rate, etc.)\n",
" # (we don't run this many epochs, but if we did, these are good values)\n",
" lr_per_sample = [0.003]*4+[0.0015]*24+[0.0003]\n",
" lr_per_minibatch = [x * minibatch_size for x in lr_per_sample]\n",
" lr_per_minibatch = [lr * minibatch_size for lr in lr_per_sample]\n",
" lr_schedule = C.learning_rate_schedule(lr_per_minibatch, C.UnitType.minibatch, epoch_size)\n",
" \n",
" # Momentum schedule\n",
@ -553,7 +553,7 @@
},
{
"cell_type": "code",
"execution_count": 11,
"execution_count": 12,
"metadata": {
"collapsed": false,
"scrolled": false
@ -565,17 +565,17 @@
"text": [
"Training 721479 parameters in 6 parameter tensors.\n",
"Learning rate per minibatch: 0.21\n",
"Finished Epoch[1 of 10]: [Training] loss = 0.787482 * 18010, metric = 15.61% * 18010 4.638s (3883.1 samples/s);\n",
"Finished Epoch[2 of 10]: [Training] loss = 0.223525 * 18051, metric = 5.25% * 18051 4.401s (4101.6 samples/s);\n",
"Finished Epoch[3 of 10]: [Training] loss = 0.154852 * 17941, metric = 3.68% * 17941 4.495s (3991.3 samples/s);\n",
"Finished Epoch[4 of 10]: [Training] loss = 0.106380 * 18059, metric = 2.64% * 18059 4.469s (4040.9 samples/s);\n",
"Finished Epoch[1 of 10]: [Training] loss = 0.787482 * 18010, metric = 15.61% * 18010 5.471s (3291.9 samples/s);\n",
"Finished Epoch[2 of 10]: [Training] loss = 0.223525 * 18051, metric = 5.25% * 18051 4.958s (3640.8 samples/s);\n",
"Finished Epoch[3 of 10]: [Training] loss = 0.154852 * 17941, metric = 3.68% * 17941 4.933s (3636.9 samples/s);\n",
"Finished Epoch[4 of 10]: [Training] loss = 0.106380 * 18059, metric = 2.64% * 18059 4.796s (3765.4 samples/s);\n",
"Learning rate per minibatch: 0.105\n",
"Finished Epoch[5 of 10]: [Training] loss = 0.069279 * 17957, metric = 1.65% * 17957 4.545s (3950.9 samples/s);\n",
"Finished Epoch[6 of 10]: [Training] loss = 0.061887 * 18021, metric = 1.50% * 18021 4.378s (4116.3 samples/s);\n",
"Finished Epoch[7 of 10]: [Training] loss = 0.054078 * 17980, metric = 1.29% * 17980 4.127s (4356.7 samples/s);\n",
"Finished Epoch[8 of 10]: [Training] loss = 0.050230 * 18025, metric = 1.30% * 18025 4.501s (4004.7 samples/s);\n",
"Finished Epoch[9 of 10]: [Training] loss = 0.030962 * 17956, metric = 0.86% * 17956 3.940s (4557.4 samples/s);\n",
"Finished Epoch[10 of 10]: [Training] loss = 0.033263 * 18039, metric = 0.90% * 18039 4.045s (4459.6 samples/s);\n"
"Finished Epoch[5 of 10]: [Training] loss = 0.069279 * 17957, metric = 1.65% * 17957 4.706s (3815.8 samples/s);\n",
"Finished Epoch[6 of 10]: [Training] loss = 0.061887 * 18021, metric = 1.50% * 18021 4.919s (3663.5 samples/s);\n",
"Finished Epoch[7 of 10]: [Training] loss = 0.054078 * 17980, metric = 1.29% * 17980 4.862s (3698.1 samples/s);\n",
"Finished Epoch[8 of 10]: [Training] loss = 0.050230 * 18025, metric = 1.30% * 18025 4.760s (3786.8 samples/s);\n",
"Finished Epoch[9 of 10]: [Training] loss = 0.030962 * 17956, metric = 0.86% * 17956 4.775s (3760.4 samples/s);\n",
"Finished Epoch[10 of 10]: [Training] loss = 0.033263 * 18039, metric = 0.90% * 18039 4.715s (3825.9 samples/s);\n"
]
}
],
@ -626,7 +626,7 @@
},
{
"cell_type": "code",
"execution_count": 12,
"execution_count": 13,
"metadata": {
"collapsed": false
},
@ -634,10 +634,6 @@
"source": [
"def evaluate(reader, model_func):\n",
" \n",
" # Create the containers for input feature (x) and the label (y)\n",
" x = C.sequence.input(vocab_size)\n",
" y = C.sequence.input(num_labels) \n",
" \n",
" # Instantiate the model function; x is the input (feature) variable \n",
" model = model_func(x)\n",
" \n",
@ -659,7 +655,7 @@
" evaluator = C.eval.Evaluator(loss, progress_printer)\n",
" evaluator.test_minibatch(data)\n",
" \n",
" evaluator.summarize_test_progress()\n"
" evaluator.summarize_test_progress()"
]
},
{
@ -671,7 +667,7 @@
},
{
"cell_type": "code",
"execution_count": 13,
"execution_count": 14,
"metadata": {
"collapsed": false
},
@ -714,7 +710,7 @@
" -0.04907253, -0.03334751, -0.09121794, 0.09192816], dtype=float32)"
]
},
"execution_count": 13,
"execution_count": 14,
"metadata": {},
"output_type": "execute_result"
}
@ -736,7 +732,7 @@
},
{
"cell_type": "code",
"execution_count": 14,
"execution_count": 15,
"metadata": {
"collapsed": false
},
@ -763,7 +759,7 @@
" ('EOS', 'O')]"
]
},
"execution_count": 14,
"execution_count": 15,
"metadata": {},
"output_type": "execute_result"
}
@ -871,7 +867,7 @@
},
{
"cell_type": "code",
"execution_count": 15,
"execution_count": 16,
"metadata": {
"collapsed": false
},
@ -918,7 +914,7 @@
},
{
"cell_type": "code",
"execution_count": 16,
"execution_count": 17,
"metadata": {
"collapsed": false
},
@ -1006,7 +1002,7 @@
},
{
"cell_type": "code",
"execution_count": 17,
"execution_count": 18,
"metadata": {
"collapsed": false
},
@ -1046,7 +1042,7 @@
},
{
"cell_type": "code",
"execution_count": 18,
"execution_count": 19,
"metadata": {
"collapsed": false
},
@ -1057,17 +1053,17 @@
"text": [
"Training 721479 parameters in 6 parameter tensors.\n",
"Learning rate per minibatch: 0.21\n",
"Finished Epoch[1 of 10]: [Training] loss = 0.776891 * 18010, metric = 15.20% * 18010 4.448s (4049.0 samples/s);\n",
"Finished Epoch[2 of 10]: [Training] loss = 0.227451 * 18051, metric = 5.15% * 18051 4.320s (4178.5 samples/s);\n",
"Finished Epoch[3 of 10]: [Training] loss = 0.152620 * 17941, metric = 3.55% * 17941 4.297s (4175.2 samples/s);\n",
"Finished Epoch[4 of 10]: [Training] loss = 0.105561 * 18059, metric = 2.57% * 18059 4.554s (3965.5 samples/s);\n",
"Finished Epoch[1 of 10]: [Training] loss = 0.776891 * 18010, metric = 15.20% * 18010 4.989s (3609.9 samples/s);\n",
"Finished Epoch[2 of 10]: [Training] loss = 0.227451 * 18051, metric = 5.15% * 18051 4.807s (3755.1 samples/s);\n",
"Finished Epoch[3 of 10]: [Training] loss = 0.152620 * 17941, metric = 3.55% * 17941 5.105s (3514.4 samples/s);\n",
"Finished Epoch[4 of 10]: [Training] loss = 0.105561 * 18059, metric = 2.57% * 18059 5.239s (3447.0 samples/s);\n",
"Learning rate per minibatch: 0.105\n",
"Finished Epoch[5 of 10]: [Training] loss = 0.066330 * 17957, metric = 1.53% * 17957 4.477s (4010.9 samples/s);\n",
"Finished Epoch[6 of 10]: [Training] loss = 0.060731 * 18021, metric = 1.45% * 18021 4.353s (4139.9 samples/s);\n",
"Finished Epoch[7 of 10]: [Training] loss = 0.050680 * 17980, metric = 1.26% * 17980 4.018s (4474.9 samples/s);\n",
"Finished Epoch[8 of 10]: [Training] loss = 0.045435 * 18025, metric = 1.21% * 18025 3.931s (4585.3 samples/s);\n",
"Finished Epoch[9 of 10]: [Training] loss = 0.030330 * 17956, metric = 0.86% * 17956 4.399s (4081.8 samples/s);\n",
"Finished Epoch[10 of 10]: [Training] loss = 0.032149 * 18039, metric = 0.89% * 18039 4.035s (4470.6 samples/s);\n",
"Finished Epoch[5 of 10]: [Training] loss = 0.066330 * 17957, metric = 1.53% * 17957 5.102s (3519.6 samples/s);\n",
"Finished Epoch[6 of 10]: [Training] loss = 0.060731 * 18021, metric = 1.45% * 18021 5.167s (3487.7 samples/s);\n",
"Finished Epoch[7 of 10]: [Training] loss = 0.050680 * 17980, metric = 1.26% * 17980 4.825s (3726.4 samples/s);\n",
"Finished Epoch[8 of 10]: [Training] loss = 0.045435 * 18025, metric = 1.21% * 18025 4.956s (3637.0 samples/s);\n",
"Finished Epoch[9 of 10]: [Training] loss = 0.030330 * 17956, metric = 0.86% * 17956 5.162s (3478.5 samples/s);\n",
"Finished Epoch[10 of 10]: [Training] loss = 0.032149 * 18039, metric = 0.89% * 18039 4.835s (3730.9 samples/s);\n",
"Finished Evaluation [1]: Minibatch[1-23]: metric = 0.37% * 10984;\n"
]
}
@ -1096,7 +1092,7 @@
},
{
"cell_type": "code",
"execution_count": 19,
"execution_count": null,
"metadata": {
"collapsed": false,
"scrolled": true
@ -1108,17 +1104,17 @@
"text": [
"Training 901479 parameters in 6 parameter tensors.\n",
"Learning rate per minibatch: 0.21\n",
"Finished Epoch[1 of 10]: [Training] loss = 0.735173 * 18010, metric = 14.15% * 18010 4.754s (3788.4 samples/s);\n",
"Finished Epoch[2 of 10]: [Training] loss = 0.199272 * 18051, metric = 4.64% * 18051 4.375s (4125.9 samples/s);\n",
"Finished Epoch[3 of 10]: [Training] loss = 0.133776 * 17941, metric = 2.98% * 17941 4.592s (3907.0 samples/s);\n",
"Finished Epoch[4 of 10]: [Training] loss = 0.089028 * 18059, metric = 2.07% * 18059 4.787s (3772.5 samples/s);\n",
"Finished Epoch[1 of 10]: [Training] loss = 0.735173 * 18010, metric = 14.15% * 18010 5.506s (3271.0 samples/s);\n",
"Finished Epoch[2 of 10]: [Training] loss = 0.199272 * 18051, metric = 4.64% * 18051 5.187s (3480.0 samples/s);\n",
"Finished Epoch[3 of 10]: [Training] loss = 0.133776 * 17941, metric = 2.98% * 17941 5.012s (3579.6 samples/s);\n",
"Finished Epoch[4 of 10]: [Training] loss = 0.089028 * 18059, metric = 2.07% * 18059 5.185s (3482.9 samples/s);\n",
"Learning rate per minibatch: 0.105\n",
"Finished Epoch[5 of 10]: [Training] loss = 0.050588 * 17957, metric = 1.25% * 17957 4.312s (4164.4 samples/s);\n",
"Finished Epoch[6 of 10]: [Training] loss = 0.045545 * 18021, metric = 0.98% * 18021 4.382s (4112.5 samples/s);\n",
"Finished Epoch[7 of 10]: [Training] loss = 0.042307 * 17980, metric = 0.90% * 17980 4.535s (3964.7 samples/s);\n",
"Finished Epoch[8 of 10]: [Training] loss = 0.031965 * 18025, metric = 0.82% * 18025 4.537s (3972.9 samples/s);\n",
"Finished Epoch[9 of 10]: [Training] loss = 0.019296 * 17956, metric = 0.45% * 17956 4.385s (4094.9 samples/s);\n",
"Finished Epoch[10 of 10]: [Training] loss = 0.019359 * 18039, metric = 0.50% * 18039 5.191s (3475.1 samples/s);\n",
"Finished Epoch[5 of 10]: [Training] loss = 0.050588 * 17957, metric = 1.25% * 17957 5.235s (3430.2 samples/s);\n",
"Finished Epoch[6 of 10]: [Training] loss = 0.045545 * 18021, metric = 0.98% * 18021 5.147s (3501.3 samples/s);\n",
"Finished Epoch[7 of 10]: [Training] loss = 0.042307 * 17980, metric = 0.90% * 17980 5.364s (3352.0 samples/s);\n",
"Finished Epoch[8 of 10]: [Training] loss = 0.031965 * 18025, metric = 0.82% * 18025 5.191s (3472.4 samples/s);\n",
"Finished Epoch[9 of 10]: [Training] loss = 0.019296 * 17956, metric = 0.45% * 17956 4.963s (3618.0 samples/s);\n",
"Finished Epoch[10 of 10]: [Training] loss = 0.019359 * 18039, metric = 0.50% * 18039 5.060s (3565.0 samples/s);\n",
"Finished Evaluation [1]: Minibatch[1-23]: metric = 0.46% * 10984;\n"
]
}
@ -1151,7 +1147,7 @@
},
{
"cell_type": "code",
"execution_count": 20,
"execution_count": null,
"metadata": {
"collapsed": false
},
@ -1162,18 +1158,11 @@
"text": [
"Training 541479 parameters in 9 parameter tensors.\n",
"Learning rate per minibatch: 0.21\n",
"Finished Epoch[1 of 10]: [Training] loss = 0.773435 * 18010, metric = 14.75% * 18010 8.725s (2064.2 samples/s);\n",
"Finished Epoch[2 of 10]: [Training] loss = 0.189657 * 18051, metric = 4.34% * 18051 7.606s (2373.3 samples/s);\n",
"Finished Epoch[3 of 10]: [Training] loss = 0.113594 * 17941, metric = 2.65% * 17941 7.401s (2424.1 samples/s);\n",
"Finished Epoch[4 of 10]: [Training] loss = 0.066348 * 18059, metric = 1.59% * 18059 8.079s (2235.3 samples/s);\n",
"Learning rate per minibatch: 0.105\n",
"Finished Epoch[5 of 10]: [Training] loss = 0.040841 * 17957, metric = 0.96% * 17957 7.584s (2367.7 samples/s);\n",
"Finished Epoch[6 of 10]: [Training] loss = 0.037693 * 18021, metric = 0.83% * 18021 7.506s (2400.9 samples/s);\n",
"Finished Epoch[7 of 10]: [Training] loss = 0.034889 * 17980, metric = 0.76% * 17980 7.626s (2357.7 samples/s);\n",
"Finished Epoch[8 of 10]: [Training] loss = 0.026481 * 18025, metric = 0.66% * 18025 7.511s (2399.8 samples/s);\n",
"Finished Epoch[9 of 10]: [Training] loss = 0.014968 * 17956, metric = 0.35% * 17956 7.319s (2453.3 samples/s);\n",
"Finished Epoch[10 of 10]: [Training] loss = 0.015767 * 18039, metric = 0.45% * 18039 7.795s (2314.2 samples/s);\n",
"Finished Evaluation [1]: Minibatch[1-23]: metric = 0.32% * 10984;\n"
"Finished Epoch[1 of 10]: [Training] loss = 0.773435 * 18010, metric = 14.75% * 18010 9.278s (1941.2 samples/s);\n",
"Finished Epoch[2 of 10]: [Training] loss = 0.189657 * 18051, metric = 4.34% * 18051 8.793s (2052.9 samples/s);\n",
"Finished Epoch[3 of 10]: [Training] loss = 0.113594 * 17941, metric = 2.65% * 17941 8.689s (2064.8 samples/s);\n",
"Finished Epoch[4 of 10]: [Training] loss = 0.066348 * 18059, metric = 1.59% * 18059 9.097s (1985.2 samples/s);\n",
"Learning rate per minibatch: 0.105\n"
]
}
],