From 8f12b2902f47e8727fd100001df9c175e074b140 Mon Sep 17 00:00:00 2001 From: Ubuntu Date: Tue, 8 Jan 2019 02:27:49 +0000 Subject: [PATCH 1/2] Adding logs with updated script for Text Classification --- .../logs/classification/fasttext-ag-news.log | 66 ++--- .../logs/classification/fasttext-dbpedia.log | 218 +++------------- .../classification/fasttext-yelp-review.log | 244 ++---------------- 3 files changed, 91 insertions(+), 437 deletions(-) diff --git a/gluonnlp/logs/classification/fasttext-ag-news.log b/gluonnlp/logs/classification/fasttext-ag-news.log index dd6673d3d..66f87e013 100644 --- a/gluonnlp/logs/classification/fasttext-ag-news.log +++ b/gluonnlp/logs/classification/fasttext-ag-news.log @@ -1,12 +1,18 @@ -NFO:root:Ngrams range for the training run : 1 +/home/ubuntu/anaconda3/lib/python3.6/site-packages/h5py/__init__.py:36: FutureWarning: Conversion of the second argument of issubdtype from `float` to `np.floating` is deprecated. In future, it will be treated as `np.float64 == np.dtype(float).type`. + from ._conv import register_converters as _register_converters +INFO:root:Ngrams range for the training run : 1 INFO:root:Loading Training data -INFO:root:Opening file fastText/data/ag_news.train for reading input +INFO:root:Opening file /dev/shm/fastText/data/ag_news.train for reading input +INFO:root:Loading Test data +INFO:root:Opening file /dev/shm/fastText/data/ag_news.test for reading input INFO:root:Vocabulary size: 95814 INFO:root:Training data converting to sequences... -INFO:root:Reading test dataset -INFO:root:Opening file fastText/data/ag_news.test for reading input +INFO:root:Done! Sequence conversion Time=15.48s, #Sentences=120000 +INFO:root:Done! Sequence conversion Time=15.33s, #Sentences=7600 INFO:root:Encoding labels INFO:root:Label mapping:{'__label__1': 0, '__label__2': 1, '__label__3': 2, '__label__4': 3} +INFO:root:Done! Preprocessing Time=2.25s, #Sentences=120000 +INFO:root:Done! Preprocessing Time=1.00s, #Sentences=7600 INFO:root:Number of labels: 4 INFO:root:Initializing network INFO:root:Running Training on ctx:gpu(0) @@ -14,8 +20,6 @@ INFO:root:Number of output units in the last layer :4 INFO:root:Network initialized INFO:root:Loss function for training:SoftmaxCrossEntropyLoss(batch_axis=0, w=None) INFO:root:Starting Training! -INFO:root:Loading the training data to memory and creating sequences! -INFO:root:Loading the test data to memory and creating sequences INFO:root:Training on 120000 samples and testing on 7600 samples INFO:root:Number of batches for each epoch : 7500.0, Display cadence: 750 INFO:root:Epoch : 0, Batches complete :0 @@ -29,7 +33,7 @@ INFO:root:Epoch : 0, Batches complete :5250 INFO:root:Epoch : 0, Batches complete :6000 INFO:root:Epoch : 0, Batches complete :6750 INFO:root:Epoch complete :0, Computing Accuracy -INFO:root:Epochs completed : 0 Test Accuracy: 0.901578947368421, Test Loss: 0.3497309461236 +INFO:root:Epochs completed : 0 Test Accuracy: 0.8764473684210526, Test Loss: 1.3566422615977125 INFO:root:Epoch : 1, Batches complete :0 INFO:root:Epoch : 1, Batches complete :750 INFO:root:Epoch : 1, Batches complete :1500 @@ -41,7 +45,7 @@ INFO:root:Epoch : 1, Batches complete :5250 INFO:root:Epoch : 1, Batches complete :6000 INFO:root:Epoch : 1, Batches complete :6750 INFO:root:Epoch complete :1, Computing Accuracy -INFO:root:Epochs completed : 1 Test Accuracy: 0.8919736842105264, Test Loss: 0.3435315266251564 +INFO:root:Epochs completed : 1 Test Accuracy: 0.8873684210526316, Test Loss: 0.8527715157881738 INFO:root:Epoch : 2, Batches complete :0 INFO:root:Epoch : 2, Batches complete :750 INFO:root:Epoch : 2, Batches complete :1500 @@ -53,7 +57,7 @@ INFO:root:Epoch : 2, Batches complete :5250 INFO:root:Epoch : 2, Batches complete :6000 INFO:root:Epoch : 2, Batches complete :6750 INFO:root:Epoch complete :2, Computing Accuracy -INFO:root:Epochs completed : 2 Test Accuracy: 0.8844736842105263, Test Loss: 0.35490143299102783 +INFO:root:Epochs completed : 2 Test Accuracy: 0.8928947368421053, Test Loss: 0.5572469649001756 INFO:root:Epoch : 3, Batches complete :0 INFO:root:Epoch : 3, Batches complete :750 INFO:root:Epoch : 3, Batches complete :1500 @@ -65,7 +69,7 @@ INFO:root:Epoch : 3, Batches complete :5250 INFO:root:Epoch : 3, Batches complete :6000 INFO:root:Epoch : 3, Batches complete :6750 INFO:root:Epoch complete :3, Computing Accuracy -INFO:root:Epochs completed : 3 Test Accuracy: 0.9018421052631579, Test Loss: 0.3105466142296791 +INFO:root:Epochs completed : 3 Test Accuracy: 0.9010526315789473, Test Loss: 0.4343520502311086 INFO:root:Epoch : 4, Batches complete :0 INFO:root:Epoch : 4, Batches complete :750 INFO:root:Epoch : 4, Batches complete :1500 @@ -77,7 +81,7 @@ INFO:root:Epoch : 4, Batches complete :5250 INFO:root:Epoch : 4, Batches complete :6000 INFO:root:Epoch : 4, Batches complete :6750 INFO:root:Epoch complete :4, Computing Accuracy -INFO:root:Epochs completed : 4 Test Accuracy: 0.8989473684210526, Test Loss: 0.2917391434311867 +INFO:root:Epochs completed : 4 Test Accuracy: 0.9067105263157895, Test Loss: 0.4059215528569428 INFO:root:Epoch : 5, Batches complete :0 INFO:root:Epoch : 5, Batches complete :750 INFO:root:Epoch : 5, Batches complete :1500 @@ -89,7 +93,7 @@ INFO:root:Epoch : 5, Batches complete :5250 INFO:root:Epoch : 5, Batches complete :6000 INFO:root:Epoch : 5, Batches complete :6750 INFO:root:Epoch complete :5, Computing Accuracy -INFO:root:Epochs completed : 5 Test Accuracy: 0.9032894736842105, Test Loss: 0.277567557990551 +INFO:root:Epochs completed : 5 Test Accuracy: 0.9067105263157895, Test Loss: 0.39512876059492386 INFO:root:Epoch : 6, Batches complete :0 INFO:root:Epoch : 6, Batches complete :750 INFO:root:Epoch : 6, Batches complete :1500 @@ -101,7 +105,7 @@ INFO:root:Epoch : 6, Batches complete :5250 INFO:root:Epoch : 6, Batches complete :6000 INFO:root:Epoch : 6, Batches complete :6750 INFO:root:Epoch complete :6, Computing Accuracy -INFO:root:Epochs completed : 6 Test Accuracy: 0.905921052631579, Test Loss: 0.2719111517071724 +INFO:root:Epochs completed : 6 Test Accuracy: 0.9088157894736842, Test Loss: 0.3879565375254762 INFO:root:Epoch : 7, Batches complete :0 INFO:root:Epoch : 7, Batches complete :750 INFO:root:Epoch : 7, Batches complete :1500 @@ -113,7 +117,7 @@ INFO:root:Epoch : 7, Batches complete :5250 INFO:root:Epoch : 7, Batches complete :6000 INFO:root:Epoch : 7, Batches complete :6750 INFO:root:Epoch complete :7, Computing Accuracy -INFO:root:Epochs completed : 7 Test Accuracy: 0.9088157894736842, Test Loss: 0.26787755638360977 +INFO:root:Epochs completed : 7 Test Accuracy: 0.9076315789473685, Test Loss: 0.3896589593266408 INFO:root:Epoch : 8, Batches complete :0 INFO:root:Epoch : 8, Batches complete :750 INFO:root:Epoch : 8, Batches complete :1500 @@ -125,7 +129,7 @@ INFO:root:Epoch : 8, Batches complete :5250 INFO:root:Epoch : 8, Batches complete :6000 INFO:root:Epoch : 8, Batches complete :6750 INFO:root:Epoch complete :8, Computing Accuracy -INFO:root:Epochs completed : 8 Test Accuracy: 0.9089473684210526, Test Loss: 0.2658883258700371 +INFO:root:Epochs completed : 8 Test Accuracy: 0.9064473684210527, Test Loss: 0.3931363523272971 INFO:root:Epoch : 9, Batches complete :0 INFO:root:Epoch : 9, Batches complete :750 INFO:root:Epoch : 9, Batches complete :1500 @@ -137,7 +141,7 @@ INFO:root:Epoch : 9, Batches complete :5250 INFO:root:Epoch : 9, Batches complete :6000 INFO:root:Epoch : 9, Batches complete :6750 INFO:root:Epoch complete :9, Computing Accuracy -INFO:root:Epochs completed : 9 Test Accuracy: 0.9101315789473684, Test Loss: 0.26578377932310104 +INFO:root:Epochs completed : 9 Test Accuracy: 0.9069736842105263, Test Loss: 0.39174262453795794 INFO:root:Epoch : 10, Batches complete :0 INFO:root:Epoch : 10, Batches complete :750 INFO:root:Epoch : 10, Batches complete :1500 @@ -149,7 +153,7 @@ INFO:root:Epoch : 10, Batches complete :5250 INFO:root:Epoch : 10, Batches complete :6000 INFO:root:Epoch : 10, Batches complete :6750 INFO:root:Epoch complete :10, Computing Accuracy -INFO:root:Epochs completed : 10 Test Accuracy: 0.9107894736842105, Test Loss: 0.265712708234787 +INFO:root:Epochs completed : 10 Test Accuracy: 0.906578947368421, Test Loss: 0.3927288375869026 INFO:root:Epoch : 11, Batches complete :0 INFO:root:Epoch : 11, Batches complete :750 INFO:root:Epoch : 11, Batches complete :1500 @@ -161,7 +165,7 @@ INFO:root:Epoch : 11, Batches complete :5250 INFO:root:Epoch : 11, Batches complete :6000 INFO:root:Epoch : 11, Batches complete :6750 INFO:root:Epoch complete :11, Computing Accuracy -INFO:root:Epochs completed : 11 Test Accuracy: 0.9101315789473684, Test Loss: 0.26596125215291977 +INFO:root:Epochs completed : 11 Test Accuracy: 0.9068421052631579, Test Loss: 0.39269958834384383 INFO:root:Epoch : 12, Batches complete :0 INFO:root:Epoch : 12, Batches complete :750 INFO:root:Epoch : 12, Batches complete :1500 @@ -173,7 +177,7 @@ INFO:root:Epoch : 12, Batches complete :5250 INFO:root:Epoch : 12, Batches complete :6000 INFO:root:Epoch : 12, Batches complete :6750 INFO:root:Epoch complete :12, Computing Accuracy -INFO:root:Epochs completed : 12 Test Accuracy: 0.9096052631578947, Test Loss: 0.2660171762108803 +INFO:root:Epochs completed : 12 Test Accuracy: 0.906578947368421, Test Loss: 0.3925883776663291 INFO:root:Epoch : 13, Batches complete :0 INFO:root:Epoch : 13, Batches complete :750 INFO:root:Epoch : 13, Batches complete :1500 @@ -185,7 +189,7 @@ INFO:root:Epoch : 13, Batches complete :5250 INFO:root:Epoch : 13, Batches complete :6000 INFO:root:Epoch : 13, Batches complete :6750 INFO:root:Epoch complete :13, Computing Accuracy -INFO:root:Epochs completed : 13 Test Accuracy: 0.9096052631578947, Test Loss: 0.26602624356746674 +INFO:root:Epochs completed : 13 Test Accuracy: 0.9067105263157895, Test Loss: 0.3926985869615486 INFO:root:Epoch : 14, Batches complete :0 INFO:root:Epoch : 14, Batches complete :750 INFO:root:Epoch : 14, Batches complete :1500 @@ -197,7 +201,7 @@ INFO:root:Epoch : 14, Batches complete :5250 INFO:root:Epoch : 14, Batches complete :6000 INFO:root:Epoch : 14, Batches complete :6750 INFO:root:Epoch complete :14, Computing Accuracy -INFO:root:Epochs completed : 14 Test Accuracy: 0.9097368421052632, Test Loss: 0.266008622944355 +INFO:root:Epochs completed : 14 Test Accuracy: 0.906578947368421, Test Loss: 0.39267066471572803 INFO:root:Epoch : 15, Batches complete :0 INFO:root:Epoch : 15, Batches complete :750 INFO:root:Epoch : 15, Batches complete :1500 @@ -209,7 +213,7 @@ INFO:root:Epoch : 15, Batches complete :5250 INFO:root:Epoch : 15, Batches complete :6000 INFO:root:Epoch : 15, Batches complete :6750 INFO:root:Epoch complete :15, Computing Accuracy -INFO:root:Epochs completed : 15 Test Accuracy: 0.9097368421052632, Test Loss: 0.2660045027732849 +INFO:root:Epochs completed : 15 Test Accuracy: 0.9067105263157895, Test Loss: 0.39267520153049473 INFO:root:Epoch : 16, Batches complete :0 INFO:root:Epoch : 16, Batches complete :750 INFO:root:Epoch : 16, Batches complete :1500 @@ -221,7 +225,7 @@ INFO:root:Epoch : 16, Batches complete :5250 INFO:root:Epoch : 16, Batches complete :6000 INFO:root:Epoch : 16, Batches complete :6750 INFO:root:Epoch complete :16, Computing Accuracy -INFO:root:Epochs completed : 16 Test Accuracy: 0.9097368421052632, Test Loss: 0.2660120502114296 +INFO:root:Epochs completed : 16 Test Accuracy: 0.9067105263157895, Test Loss: 0.3926834414547652 INFO:root:Epoch : 17, Batches complete :0 INFO:root:Epoch : 17, Batches complete :750 INFO:root:Epoch : 17, Batches complete :1500 @@ -233,7 +237,7 @@ INFO:root:Epoch : 17, Batches complete :5250 INFO:root:Epoch : 17, Batches complete :6000 INFO:root:Epoch : 17, Batches complete :6750 INFO:root:Epoch complete :17, Computing Accuracy -INFO:root:Epochs completed : 17 Test Accuracy: 0.9097368421052632, Test Loss: 0.2660161182284355 +INFO:root:Epochs completed : 17 Test Accuracy: 0.9067105263157895, Test Loss: 0.3926893989168922 INFO:root:Epoch : 18, Batches complete :0 INFO:root:Epoch : 18, Batches complete :750 INFO:root:Epoch : 18, Batches complete :1500 @@ -245,7 +249,7 @@ INFO:root:Epoch : 18, Batches complete :5250 INFO:root:Epoch : 18, Batches complete :6000 INFO:root:Epoch : 18, Batches complete :6750 INFO:root:Epoch complete :18, Computing Accuracy -INFO:root:Epochs completed : 18 Test Accuracy: 0.9097368421052632, Test Loss: 0.26601601392030716 +INFO:root:Epochs completed : 18 Test Accuracy: 0.9067105263157895, Test Loss: 0.3926934099231706 INFO:root:Epoch : 19, Batches complete :0 INFO:root:Epoch : 19, Batches complete :750 INFO:root:Epoch : 19, Batches complete :1500 @@ -257,7 +261,7 @@ INFO:root:Epoch : 19, Batches complete :5250 INFO:root:Epoch : 19, Batches complete :6000 INFO:root:Epoch : 19, Batches complete :6750 INFO:root:Epoch complete :19, Computing Accuracy -INFO:root:Epochs completed : 19 Test Accuracy: 0.9097368421052632, Test Loss: 0.2660166919231415 +INFO:root:Epochs completed : 19 Test Accuracy: 0.9067105263157895, Test Loss: 0.39269088007662906 INFO:root:Epoch : 20, Batches complete :0 INFO:root:Epoch : 20, Batches complete :750 INFO:root:Epoch : 20, Batches complete :1500 @@ -269,7 +273,7 @@ INFO:root:Epoch : 20, Batches complete :5250 INFO:root:Epoch : 20, Batches complete :6000 INFO:root:Epoch : 20, Batches complete :6750 INFO:root:Epoch complete :20, Computing Accuracy -INFO:root:Epochs completed : 20 Test Accuracy: 0.9097368421052632, Test Loss: 0.26601699739694595 +INFO:root:Epochs completed : 20 Test Accuracy: 0.9067105263157895, Test Loss: 0.3926890772733052 INFO:root:Epoch : 21, Batches complete :0 INFO:root:Epoch : 21, Batches complete :750 INFO:root:Epoch : 21, Batches complete :1500 @@ -281,7 +285,7 @@ INFO:root:Epoch : 21, Batches complete :5250 INFO:root:Epoch : 21, Batches complete :6000 INFO:root:Epoch : 21, Batches complete :6750 INFO:root:Epoch complete :21, Computing Accuracy -INFO:root:Epochs completed : 21 Test Accuracy: 0.9097368421052632, Test Loss: 0.2660171613097191 +INFO:root:Epochs completed : 21 Test Accuracy: 0.9067105263157895, Test Loss: 0.3926877922782257 INFO:root:Epoch : 22, Batches complete :0 INFO:root:Epoch : 22, Batches complete :750 INFO:root:Epoch : 22, Batches complete :1500 @@ -293,7 +297,7 @@ INFO:root:Epoch : 22, Batches complete :5250 INFO:root:Epoch : 22, Batches complete :6000 INFO:root:Epoch : 22, Batches complete :6750 INFO:root:Epoch complete :22, Computing Accuracy -INFO:root:Epochs completed : 22 Test Accuracy: 0.9097368421052632, Test Loss: 0.26601725816726685 +INFO:root:Epochs completed : 22 Test Accuracy: 0.9067105263157895, Test Loss: 0.39268737782607804 INFO:root:Epoch : 23, Batches complete :0 INFO:root:Epoch : 23, Batches complete :750 INFO:root:Epoch : 23, Batches complete :1500 @@ -305,7 +309,7 @@ INFO:root:Epoch : 23, Batches complete :5250 INFO:root:Epoch : 23, Batches complete :6000 INFO:root:Epoch : 23, Batches complete :6750 INFO:root:Epoch complete :23, Computing Accuracy -INFO:root:Epochs completed : 23 Test Accuracy: 0.9097368421052632, Test Loss: 0.26601728796958923 +INFO:root:Epochs completed : 23 Test Accuracy: 0.9067105263157895, Test Loss: 0.39268723316680565 INFO:root:Epoch : 24, Batches complete :0 INFO:root:Epoch : 24, Batches complete :750 INFO:root:Epoch : 24, Batches complete :1500 @@ -317,4 +321,4 @@ INFO:root:Epoch : 24, Batches complete :5250 INFO:root:Epoch : 24, Batches complete :6000 INFO:root:Epoch : 24, Batches complete :6750 INFO:root:Epoch complete :24, Computing Accuracy -INFO:root:Epochs completed : 24 Test Accuracy: 0.9097368421052632, Test Loss: 0.266017310321331 +INFO:root:Epochs completed : 24 Test Accuracy: 0.9067105263157895, Test Loss: 0.3926871975870974 diff --git a/gluonnlp/logs/classification/fasttext-dbpedia.log b/gluonnlp/logs/classification/fasttext-dbpedia.log index 9ae004408..23e50c963 100644 --- a/gluonnlp/logs/classification/fasttext-dbpedia.log +++ b/gluonnlp/logs/classification/fasttext-dbpedia.log @@ -1,320 +1,176 @@ +/home/ubuntu/anaconda3/lib/python3.6/site-packages/h5py/__init__.py:36: FutureWarning: Conversion of the second argument of issubdtype from `float` to `np.floating` is deprecated. In future, it will be treated as `np.float64 == np.dtype(float).type`. + from ._conv import register_converters as _register_converters INFO:root:Ngrams range for the training run : 1 INFO:root:Loading Training data -INFO:root:Opening file fastText/data/dbpedia.train for reading input +INFO:root:Opening file /dev/shm/fastText/data/dbpedia.train for reading input +INFO:root:Loading Test data +INFO:root:Opening file /dev/shm/fastText/data/dbpedia.test for reading input INFO:root:Vocabulary size: 803505 INFO:root:Training data converting to sequences... -INFO:root:Reading test dataset -INFO:root:Opening file fastText/data/dbpedia.test for reading input +INFO:root:Done! Sequence conversion Time=161.65s, #Sentences=560000 +INFO:root:Done! Sequence conversion Time=145.70s, #Sentences=70000 INFO:root:Encoding labels INFO:root:Label mapping:{'__label__1': 0, '__label__10': 1, '__label__11': 2, '__label__12': 3, '__label__13': 4, '__label__14': 5, '__label__2': 6, '__label__3': 7, '__label__4': 8, '__label__5': 9, '__label__6': 10, '__label__7': 11, '__label__8': 12, '__label__9': 13} +INFO:root:Done! Preprocessing Time=12.20s, #Sentences=560000 +INFO:root:Done! Preprocessing Time=5.16s, #Sentences=70000 +/home/ubuntu/anaconda3/lib/python3.6/site-packages/gluonnlp/data/sampler.py:366: UserWarning: Some buckets are empty and will be removed. Unused bucket keys=[833, 907, 981, 1129, 1203, 1425] + str(unused_bucket_keys)) INFO:root:Number of labels: 14 INFO:root:Initializing network -INFO:root:Running Training on ctx:gpu(0) +INFO:root:Running Training on ctx:gpu(1) INFO:root:Number of output units in the last layer :14 INFO:root:Network initialized INFO:root:Loss function for training:SoftmaxCrossEntropyLoss(batch_axis=0, w=None) INFO:root:Starting Training! -INFO:root:Loading the training data to memory and creating sequences! -INFO:root:Loading the test data to memory and creating sequences INFO:root:Training on 560000 samples and testing on 70000 samples INFO:root:Number of batches for each epoch : 35000.0, Display cadence: 3500 INFO:root:Epoch : 0, Batches complete :0 INFO:root:Epoch : 0, Batches complete :3500 INFO:root:Epoch : 0, Batches complete :7000 INFO:root:Epoch : 0, Batches complete :10500 -INFO:root:Epoch : 0, Batches complete :14000 -INFO:root:Epoch : 0, Batches complete :17500 -INFO:root:Epoch : 0, Batches complete :21000 -INFO:root:Epoch : 0, Batches complete :24500 -INFO:root:Epoch : 0, Batches complete :28000 -INFO:root:Epoch : 0, Batches complete :31500 INFO:root:Epoch complete :0, Computing Accuracy -INFO:root:Epochs completed : 0 Test Accuracy: 0.8932, Test Loss: 0.7962570709841592 +INFO:root:Epochs completed : 0 Test Accuracy: 0.9699, Test Loss: 0.6863976057549881 INFO:root:Epoch : 1, Batches complete :0 INFO:root:Epoch : 1, Batches complete :3500 INFO:root:Epoch : 1, Batches complete :7000 INFO:root:Epoch : 1, Batches complete :10500 -INFO:root:Epoch : 1, Batches complete :14000 -INFO:root:Epoch : 1, Batches complete :17500 -INFO:root:Epoch : 1, Batches complete :21000 -INFO:root:Epoch : 1, Batches complete :24500 -INFO:root:Epoch : 1, Batches complete :28000 -INFO:root:Epoch : 1, Batches complete :31500 INFO:root:Epoch complete :1, Computing Accuracy -INFO:root:Epochs completed : 1 Test Accuracy: 0.9265142857142857, Test Loss: 0.5813547594206672 +INFO:root:Epochs completed : 1 Test Accuracy: 0.9768714285714286, Test Loss: 0.4500242570382416 INFO:root:Epoch : 2, Batches complete :0 INFO:root:Epoch : 2, Batches complete :3500 INFO:root:Epoch : 2, Batches complete :7000 INFO:root:Epoch : 2, Batches complete :10500 -INFO:root:Epoch : 2, Batches complete :14000 -INFO:root:Epoch : 2, Batches complete :17500 -INFO:root:Epoch : 2, Batches complete :21000 -INFO:root:Epoch : 2, Batches complete :24500 -INFO:root:Epoch : 2, Batches complete :28000 -INFO:root:Epoch : 2, Batches complete :31500 INFO:root:Epoch complete :2, Computing Accuracy -INFO:root:Epochs completed : 2 Test Accuracy: 0.9326142857142857, Test Loss: 0.4382454127073288 +INFO:root:Epochs completed : 2 Test Accuracy: 0.9772857142857143, Test Loss: 0.35363802586575893 INFO:root:Epoch : 3, Batches complete :0 INFO:root:Epoch : 3, Batches complete :3500 INFO:root:Epoch : 3, Batches complete :7000 INFO:root:Epoch : 3, Batches complete :10500 -INFO:root:Epoch : 3, Batches complete :14000 -INFO:root:Epoch : 3, Batches complete :17500 -INFO:root:Epoch : 3, Batches complete :21000 -INFO:root:Epoch : 3, Batches complete :24500 -INFO:root:Epoch : 3, Batches complete :28000 -INFO:root:Epoch : 3, Batches complete :31500 INFO:root:Epoch complete :3, Computing Accuracy -INFO:root:Epochs completed : 3 Test Accuracy: 0.9588857142857143, Test Loss: 0.22716643384524748 +INFO:root:Epochs completed : 3 Test Accuracy: 0.9792, Test Loss: 0.2845098681688672 INFO:root:Epoch : 4, Batches complete :0 INFO:root:Epoch : 4, Batches complete :3500 INFO:root:Epoch : 4, Batches complete :7000 INFO:root:Epoch : 4, Batches complete :10500 -INFO:root:Epoch : 4, Batches complete :14000 -INFO:root:Epoch : 4, Batches complete :17500 -INFO:root:Epoch : 4, Batches complete :21000 -INFO:root:Epoch : 4, Batches complete :24500 -INFO:root:Epoch : 4, Batches complete :28000 -INFO:root:Epoch : 4, Batches complete :31500 INFO:root:Epoch complete :4, Computing Accuracy -INFO:root:Epochs completed : 4 Test Accuracy: 0.9726285714285714, Test Loss: 0.1608757489493915 +INFO:root:Epochs completed : 4 Test Accuracy: 0.9794, Test Loss: 0.2565364573793349 INFO:root:Epoch : 5, Batches complete :0 INFO:root:Epoch : 5, Batches complete :3500 INFO:root:Epoch : 5, Batches complete :7000 INFO:root:Epoch : 5, Batches complete :10500 -INFO:root:Epoch : 5, Batches complete :14000 -INFO:root:Epoch : 5, Batches complete :17500 -INFO:root:Epoch : 5, Batches complete :21000 -INFO:root:Epoch : 5, Batches complete :24500 -INFO:root:Epoch : 5, Batches complete :28000 -INFO:root:Epoch : 5, Batches complete :31500 INFO:root:Epoch complete :5, Computing Accuracy -INFO:root:Epochs completed : 5 Test Accuracy: 0.9782285714285714, Test Loss: 0.1315484730260713 +INFO:root:Epochs completed : 5 Test Accuracy: 0.9788857142857142, Test Loss: 0.24630683094896577 INFO:root:Epoch : 6, Batches complete :0 INFO:root:Epoch : 6, Batches complete :3500 INFO:root:Epoch : 6, Batches complete :7000 INFO:root:Epoch : 6, Batches complete :10500 -INFO:root:Epoch : 6, Batches complete :14000 -INFO:root:Epoch : 6, Batches complete :17500 -INFO:root:Epoch : 6, Batches complete :21000 -INFO:root:Epoch : 6, Batches complete :24500 -INFO:root:Epoch : 6, Batches complete :28000 -INFO:root:Epoch : 6, Batches complete :31500 INFO:root:Epoch complete :6, Computing Accuracy -INFO:root:Epochs completed : 6 Test Accuracy: 0.9792285714285714, Test Loss: 0.12293769291469024 +INFO:root:Epochs completed : 6 Test Accuracy: 0.9786857142857143, Test Loss: 0.23837156017298708 INFO:root:Epoch : 7, Batches complete :0 INFO:root:Epoch : 7, Batches complete :3500 INFO:root:Epoch : 7, Batches complete :7000 INFO:root:Epoch : 7, Batches complete :10500 -INFO:root:Epoch : 7, Batches complete :14000 -INFO:root:Epoch : 7, Batches complete :17500 -INFO:root:Epoch : 7, Batches complete :21000 -INFO:root:Epoch : 7, Batches complete :24500 -INFO:root:Epoch : 7, Batches complete :28000 -INFO:root:Epoch : 7, Batches complete :31500 INFO:root:Epoch complete :7, Computing Accuracy -INFO:root:Epochs completed : 7 Test Accuracy: 0.9794, Test Loss: 0.12126661326204029 +INFO:root:Epochs completed : 7 Test Accuracy: 0.9786714285714285, Test Loss: 0.23524657592540643 INFO:root:Epoch : 8, Batches complete :0 INFO:root:Epoch : 8, Batches complete :3500 INFO:root:Epoch : 8, Batches complete :7000 INFO:root:Epoch : 8, Batches complete :10500 -INFO:root:Epoch : 8, Batches complete :14000 -INFO:root:Epoch : 8, Batches complete :17500 -INFO:root:Epoch : 8, Batches complete :21000 -INFO:root:Epoch : 8, Batches complete :24500 -INFO:root:Epoch : 8, Batches complete :28000 -INFO:root:Epoch : 8, Batches complete :31500 INFO:root:Epoch complete :8, Computing Accuracy -INFO:root:Epochs completed : 8 Test Accuracy: 0.9800428571428571, Test Loss: 0.11906558339084902 +INFO:root:Epochs completed : 8 Test Accuracy: 0.9787285714285714, Test Loss: 0.23481739638505386 INFO:root:Epoch : 9, Batches complete :0 INFO:root:Epoch : 9, Batches complete :3500 INFO:root:Epoch : 9, Batches complete :7000 INFO:root:Epoch : 9, Batches complete :10500 -INFO:root:Epoch : 9, Batches complete :14000 -INFO:root:Epoch : 9, Batches complete :17500 -INFO:root:Epoch : 9, Batches complete :21000 -INFO:root:Epoch : 9, Batches complete :24500 -INFO:root:Epoch : 9, Batches complete :28000 -INFO:root:Epoch : 9, Batches complete :31500 INFO:root:Epoch complete :9, Computing Accuracy -INFO:root:Epochs completed : 9 Test Accuracy: 0.9801857142857143, Test Loss: 0.11914572800908767 +INFO:root:Epochs completed : 9 Test Accuracy: 0.9787428571428571, Test Loss: 0.2338253844417883 INFO:root:Epoch : 10, Batches complete :0 INFO:root:Epoch : 10, Batches complete :3500 INFO:root:Epoch : 10, Batches complete :7000 INFO:root:Epoch : 10, Batches complete :10500 -INFO:root:Epoch : 10, Batches complete :14000 -INFO:root:Epoch : 10, Batches complete :17500 -INFO:root:Epoch : 10, Batches complete :21000 -INFO:root:Epoch : 10, Batches complete :24500 -INFO:root:Epoch : 10, Batches complete :28000 -INFO:root:Epoch : 10, Batches complete :31500 INFO:root:Epoch complete :10, Computing Accuracy -INFO:root:Epochs completed : 10 Test Accuracy: 0.9802285714285714, Test Loss: 0.11865360268524712 +INFO:root:Epochs completed : 10 Test Accuracy: 0.9786571428571429, Test Loss: 0.23401775828205204 INFO:root:Epoch : 11, Batches complete :0 INFO:root:Epoch : 11, Batches complete :3500 INFO:root:Epoch : 11, Batches complete :7000 INFO:root:Epoch : 11, Batches complete :10500 -INFO:root:Epoch : 11, Batches complete :14000 -INFO:root:Epoch : 11, Batches complete :17500 -INFO:root:Epoch : 11, Batches complete :21000 -INFO:root:Epoch : 11, Batches complete :24500 -INFO:root:Epoch : 11, Batches complete :28000 -INFO:root:Epoch : 11, Batches complete :31500 INFO:root:Epoch complete :11, Computing Accuracy -INFO:root:Epochs completed : 11 Test Accuracy: 0.9802142857142857, Test Loss: 0.11847782262734007 +INFO:root:Epochs completed : 11 Test Accuracy: 0.9786857142857143, Test Loss: 0.2339698174562463 INFO:root:Epoch : 12, Batches complete :0 INFO:root:Epoch : 12, Batches complete :3500 INFO:root:Epoch : 12, Batches complete :7000 INFO:root:Epoch : 12, Batches complete :10500 -INFO:root:Epoch : 12, Batches complete :14000 -INFO:root:Epoch : 12, Batches complete :17500 -INFO:root:Epoch : 12, Batches complete :21000 -INFO:root:Epoch : 12, Batches complete :24500 -INFO:root:Epoch : 12, Batches complete :28000 -INFO:root:Epoch : 12, Batches complete :31500 INFO:root:Epoch complete :12, Computing Accuracy -INFO:root:Epochs completed : 12 Test Accuracy: 0.9802285714285714, Test Loss: 0.11838984617165157 +INFO:root:Epochs completed : 12 Test Accuracy: 0.9786571428571429, Test Loss: 0.23381617988806827 INFO:root:Epoch : 13, Batches complete :0 INFO:root:Epoch : 13, Batches complete :3500 INFO:root:Epoch : 13, Batches complete :7000 INFO:root:Epoch : 13, Batches complete :10500 -INFO:root:Epoch : 13, Batches complete :14000 -INFO:root:Epoch : 13, Batches complete :17500 -INFO:root:Epoch : 13, Batches complete :21000 -INFO:root:Epoch : 13, Batches complete :24500 -INFO:root:Epoch : 13, Batches complete :28000 -INFO:root:Epoch : 13, Batches complete :31500 INFO:root:Epoch complete :13, Computing Accuracy -INFO:root:Epochs completed : 13 Test Accuracy: 0.9802142857142857, Test Loss: 0.11838840480361672 +INFO:root:Epochs completed : 13 Test Accuracy: 0.9786857142857143, Test Loss: 0.23380975439287707 INFO:root:Epoch : 14, Batches complete :0 INFO:root:Epoch : 14, Batches complete :3500 INFO:root:Epoch : 14, Batches complete :7000 INFO:root:Epoch : 14, Batches complete :10500 -INFO:root:Epoch : 14, Batches complete :14000 -INFO:root:Epoch : 14, Batches complete :17500 -INFO:root:Epoch : 14, Batches complete :21000 -INFO:root:Epoch : 14, Batches complete :24500 -INFO:root:Epoch : 14, Batches complete :28000 -INFO:root:Epoch : 14, Batches complete :31500 INFO:root:Epoch complete :14, Computing Accuracy -INFO:root:Epochs completed : 14 Test Accuracy: 0.9801857142857143, Test Loss: 0.11839249964271267 +INFO:root:Epochs completed : 14 Test Accuracy: 0.9786714285714285, Test Loss: 0.2338121177066216 INFO:root:Epoch : 15, Batches complete :0 INFO:root:Epoch : 15, Batches complete :3500 INFO:root:Epoch : 15, Batches complete :7000 INFO:root:Epoch : 15, Batches complete :10500 -INFO:root:Epoch : 15, Batches complete :14000 -INFO:root:Epoch : 15, Batches complete :17500 -INFO:root:Epoch : 15, Batches complete :21000 -INFO:root:Epoch : 15, Batches complete :24500 -INFO:root:Epoch : 15, Batches complete :28000 -INFO:root:Epoch : 15, Batches complete :31500 INFO:root:Epoch complete :15, Computing Accuracy -INFO:root:Epochs completed : 15 Test Accuracy: 0.9801714285714286, Test Loss: 0.11838149045194898 +INFO:root:Epochs completed : 15 Test Accuracy: 0.9786571428571429, Test Loss: 0.23381176800340597 INFO:root:Epoch : 16, Batches complete :0 INFO:root:Epoch : 16, Batches complete :3500 INFO:root:Epoch : 16, Batches complete :7000 INFO:root:Epoch : 16, Batches complete :10500 -INFO:root:Epoch : 16, Batches complete :14000 -INFO:root:Epoch : 16, Batches complete :17500 -INFO:root:Epoch : 16, Batches complete :21000 -INFO:root:Epoch : 16, Batches complete :24500 -INFO:root:Epoch : 16, Batches complete :28000 -INFO:root:Epoch : 16, Batches complete :31500 INFO:root:Epoch complete :16, Computing Accuracy -INFO:root:Epochs completed : 16 Test Accuracy: 0.9801571428571428, Test Loss: 0.1183883624417441 +INFO:root:Epochs completed : 16 Test Accuracy: 0.9786571428571429, Test Loss: 0.23380597550799498 INFO:root:Epoch : 17, Batches complete :0 INFO:root:Epoch : 17, Batches complete :3500 INFO:root:Epoch : 17, Batches complete :7000 INFO:root:Epoch : 17, Batches complete :10500 -INFO:root:Epoch : 17, Batches complete :14000 -INFO:root:Epoch : 17, Batches complete :17500 -INFO:root:Epoch : 17, Batches complete :21000 -INFO:root:Epoch : 17, Batches complete :24500 -INFO:root:Epoch : 17, Batches complete :28000 -INFO:root:Epoch : 17, Batches complete :31500 INFO:root:Epoch complete :17, Computing Accuracy -INFO:root:Epochs completed : 17 Test Accuracy: 0.9801428571428571, Test Loss: 0.11839138993195127 +INFO:root:Epochs completed : 17 Test Accuracy: 0.9786571428571429, Test Loss: 0.23380099870770082 INFO:root:Epoch : 18, Batches complete :0 INFO:root:Epoch : 18, Batches complete :3500 INFO:root:Epoch : 18, Batches complete :7000 INFO:root:Epoch : 18, Batches complete :10500 -INFO:root:Epoch : 18, Batches complete :14000 -INFO:root:Epoch : 18, Batches complete :17500 -INFO:root:Epoch : 18, Batches complete :21000 -INFO:root:Epoch : 18, Batches complete :24500 -INFO:root:Epoch : 18, Batches complete :28000 -INFO:root:Epoch : 18, Batches complete :31500 INFO:root:Epoch complete :18, Computing Accuracy -INFO:root:Epochs completed : 18 Test Accuracy: 0.9801571428571428, Test Loss: 0.11839457196848734 +INFO:root:Epochs completed : 18 Test Accuracy: 0.9786571428571429, Test Loss: 0.2337988977641527 INFO:root:Epoch : 19, Batches complete :0 INFO:root:Epoch : 19, Batches complete :3500 INFO:root:Epoch : 19, Batches complete :7000 INFO:root:Epoch : 19, Batches complete :10500 -INFO:root:Epoch : 19, Batches complete :14000 -INFO:root:Epoch : 19, Batches complete :17500 -INFO:root:Epoch : 19, Batches complete :21000 -INFO:root:Epoch : 19, Batches complete :24500 -INFO:root:Epoch : 19, Batches complete :28000 -INFO:root:Epoch : 19, Batches complete :31500 INFO:root:Epoch complete :19, Computing Accuracy -INFO:root:Epochs completed : 19 Test Accuracy: 0.9801428571428571, Test Loss: 0.11839560738631653 +INFO:root:Epochs completed : 19 Test Accuracy: 0.9786571428571429, Test Loss: 0.23379760068644875 INFO:root:Epoch : 20, Batches complete :0 INFO:root:Epoch : 20, Batches complete :3500 INFO:root:Epoch : 20, Batches complete :7000 INFO:root:Epoch : 20, Batches complete :10500 -INFO:root:Epoch : 20, Batches complete :14000 -INFO:root:Epoch : 20, Batches complete :17500 -INFO:root:Epoch : 20, Batches complete :21000 -INFO:root:Epoch : 20, Batches complete :24500 -INFO:root:Epoch : 20, Batches complete :28000 -INFO:root:Epoch : 20, Batches complete :31500 INFO:root:Epoch complete :20, Computing Accuracy -INFO:root:Epochs completed : 20 Test Accuracy: 0.9801428571428571, Test Loss: 0.11839546390942167 +INFO:root:Epochs completed : 20 Test Accuracy: 0.9786571428571429, Test Loss: 0.233796498817279 INFO:root:Epoch : 21, Batches complete :0 INFO:root:Epoch : 21, Batches complete :3500 INFO:root:Epoch : 21, Batches complete :7000 INFO:root:Epoch : 21, Batches complete :10500 -INFO:root:Epoch : 21, Batches complete :14000 -INFO:root:Epoch : 21, Batches complete :17500 -INFO:root:Epoch : 21, Batches complete :21000 -INFO:root:Epoch : 21, Batches complete :24500 -INFO:root:Epoch : 21, Batches complete :28000 -INFO:root:Epoch : 21, Batches complete :31500 INFO:root:Epoch complete :21, Computing Accuracy -INFO:root:Epochs completed : 21 Test Accuracy: 0.9801428571428571, Test Loss: 0.11839593265737808 +INFO:root:Epochs completed : 21 Test Accuracy: 0.9786571428571429, Test Loss: 0.23379624106003863 INFO:root:Epoch : 22, Batches complete :0 INFO:root:Epoch : 22, Batches complete :3500 INFO:root:Epoch : 22, Batches complete :7000 INFO:root:Epoch : 22, Batches complete :10500 -INFO:root:Epoch : 22, Batches complete :14000 -INFO:root:Epoch : 22, Batches complete :17500 -INFO:root:Epoch : 22, Batches complete :21000 -INFO:root:Epoch : 22, Batches complete :24500 -INFO:root:Epoch : 22, Batches complete :28000 -INFO:root:Epoch : 22, Batches complete :31500 INFO:root:Epoch complete :22, Computing Accuracy -INFO:root:Epochs completed : 22 Test Accuracy: 0.9801428571428571, Test Loss: 0.1183959456426757 +INFO:root:Epochs completed : 22 Test Accuracy: 0.9786571428571429, Test Loss: 0.2337961024970286 INFO:root:Epoch : 23, Batches complete :0 INFO:root:Epoch : 23, Batches complete :3500 INFO:root:Epoch : 23, Batches complete :7000 INFO:root:Epoch : 23, Batches complete :10500 -INFO:root:Epoch : 23, Batches complete :14000 -INFO:root:Epoch : 23, Batches complete :17500 -INFO:root:Epoch : 23, Batches complete :21000 -INFO:root:Epoch : 23, Batches complete :24500 -INFO:root:Epoch : 23, Batches complete :28000 -INFO:root:Epoch : 23, Batches complete :31500 INFO:root:Epoch complete :23, Computing Accuracy -INFO:root:Epochs completed : 23 Test Accuracy: 0.9801428571428571, Test Loss: 0.11839596565280647 +INFO:root:Epochs completed : 23 Test Accuracy: 0.9786571428571429, Test Loss: 0.23379605659751337 INFO:root:Epoch : 24, Batches complete :0 INFO:root:Epoch : 24, Batches complete :3500 INFO:root:Epoch : 24, Batches complete :7000 INFO:root:Epoch : 24, Batches complete :10500 -INFO:root:Epoch : 24, Batches complete :14000 -INFO:root:Epoch : 24, Batches complete :17500 -INFO:root:Epoch : 24, Batches complete :21000 -INFO:root:Epoch : 24, Batches complete :24500 -INFO:root:Epoch : 24, Batches complete :28000 -INFO:root:Epoch : 24, Batches complete :31500 INFO:root:Epoch complete :24, Computing Accuracy -INFO:root:Epochs completed : 24 Test Accuracy: 0.9801428571428571, Test Loss: 0.1183959660785539 +INFO:root:Epochs completed : 24 Test Accuracy: 0.9786571428571429, Test Loss: 0.23379605076231144 diff --git a/gluonnlp/logs/classification/fasttext-yelp-review.log b/gluonnlp/logs/classification/fasttext-yelp-review.log index 49ff5886d..8655a89ee 100644 --- a/gluonnlp/logs/classification/fasttext-yelp-review.log +++ b/gluonnlp/logs/classification/fasttext-yelp-review.log @@ -1,12 +1,18 @@ +/home/ubuntu/anaconda3/lib/python3.6/site-packages/h5py/__init__.py:36: FutureWarning: Conversion of the second argument of issubdtype from `float` to `np.floating` is deprecated. In future, it will be treated as `np.float64 == np.dtype(float).type`. + from ._conv import register_converters as _register_converters INFO:root:Ngrams range for the training run : 1 INFO:root:Loading Training data -INFO:root:Opening file fastText/data/yelp_review_polarity.train for reading input +INFO:root:Opening file /dev/shm/fastText/data/yelp_review_polarity.train for reading input +INFO:root:Loading Test data +INFO:root:Opening file /dev/shm/fastText/data/yelp_review_polarity.test for reading input INFO:root:Vocabulary size: 464402 INFO:root:Training data converting to sequences... -INFO:root:Reading test dataset -INFO:root:Opening file fastText/data/yelp_review_polarity.test for reading input +INFO:root:Done! Sequence conversion Time=109.57s, #Sentences=560000 +INFO:root:Done! Sequence conversion Time=93.96s, #Sentences=38000 INFO:root:Encoding labels INFO:root:Label mapping:{'__label__1': 0, '__label__2': 1} +INFO:root:Done! Preprocessing Time=20.78s, #Sentences=560000 +INFO:root:Done! Preprocessing Time=14.98s, #Sentences=38000 INFO:root:Number of labels: 2 INFO:root:Initializing network INFO:root:Running Training on ctx:gpu(0) @@ -15,8 +21,6 @@ INFO:root:Network initialized INFO:root:Changing the loss function to sigmoid since its Binary Classification INFO:root:Loss function for training:SigmoidBinaryCrossEntropyLoss(batch_axis=0, w=None) INFO:root:Starting Training! -INFO:root:Loading the training data to memory and creating sequences! -INFO:root:Loading the test data to memory and creating sequences INFO:root:Training on 560000 samples and testing on 38000 samples INFO:root:Number of batches for each epoch : 35000.0, Display cadence: 3500 INFO:root:Epoch : 0, Batches complete :0 @@ -26,11 +30,8 @@ INFO:root:Epoch : 0, Batches complete :10500 INFO:root:Epoch : 0, Batches complete :14000 INFO:root:Epoch : 0, Batches complete :17500 INFO:root:Epoch : 0, Batches complete :21000 -INFO:root:Epoch : 0, Batches complete :24500 -INFO:root:Epoch : 0, Batches complete :28000 -INFO:root:Epoch : 0, Batches complete :31500 INFO:root:Epoch complete :0, Computing Accuracy -INFO:root:Epochs completed : 0 Test Accuracy: 0.8283684210526315, Test Loss: 0.3383066622834457 +INFO:root:Epochs completed : 0 Test Accuracy: 0.9038157894736842, Test Loss: 0.3171945011025587 INFO:root:Epoch : 1, Batches complete :0 INFO:root:Epoch : 1, Batches complete :3500 INFO:root:Epoch : 1, Batches complete :7000 @@ -38,11 +39,8 @@ INFO:root:Epoch : 1, Batches complete :10500 INFO:root:Epoch : 1, Batches complete :14000 INFO:root:Epoch : 1, Batches complete :17500 INFO:root:Epoch : 1, Batches complete :21000 -INFO:root:Epoch : 1, Batches complete :24500 -INFO:root:Epoch : 1, Batches complete :28000 -INFO:root:Epoch : 1, Batches complete :31500 INFO:root:Epoch complete :1, Computing Accuracy -INFO:root:Epochs completed : 1 Test Accuracy: 0.8102105263157895, Test Loss: 0.37630463744464676 +INFO:root:Epochs completed : 1 Test Accuracy: 0.9285263157894736, Test Loss: 0.22869067299865983 INFO:root:Epoch : 2, Batches complete :0 INFO:root:Epoch : 2, Batches complete :3500 INFO:root:Epoch : 2, Batches complete :7000 @@ -50,11 +48,8 @@ INFO:root:Epoch : 2, Batches complete :10500 INFO:root:Epoch : 2, Batches complete :14000 INFO:root:Epoch : 2, Batches complete :17500 INFO:root:Epoch : 2, Batches complete :21000 -INFO:root:Epoch : 2, Batches complete :24500 -INFO:root:Epoch : 2, Batches complete :28000 -INFO:root:Epoch : 2, Batches complete :31500 INFO:root:Epoch complete :2, Computing Accuracy -INFO:root:Epochs completed : 2 Test Accuracy: 0.9157631578947368, Test Loss: 0.23420168302561106 +INFO:root:Epochs completed : 2 Test Accuracy: 0.9318421052631579, Test Loss: 0.2200586399126942 INFO:root:Epoch : 3, Batches complete :0 INFO:root:Epoch : 3, Batches complete :3500 INFO:root:Epoch : 3, Batches complete :7000 @@ -62,11 +57,8 @@ INFO:root:Epoch : 3, Batches complete :10500 INFO:root:Epoch : 3, Batches complete :14000 INFO:root:Epoch : 3, Batches complete :17500 INFO:root:Epoch : 3, Batches complete :21000 -INFO:root:Epoch : 3, Batches complete :24500 -INFO:root:Epoch : 3, Batches complete :28000 -INFO:root:Epoch : 3, Batches complete :31500 INFO:root:Epoch complete :3, Computing Accuracy -INFO:root:Epochs completed : 3 Test Accuracy: 0.9245263157894736, Test Loss: 0.236912696769363 +INFO:root:Epochs completed : 3 Test Accuracy: 0.9379736842105263, Test Loss: 0.19040078702274849 INFO:root:Epoch : 4, Batches complete :0 INFO:root:Epoch : 4, Batches complete :3500 INFO:root:Epoch : 4, Batches complete :7000 @@ -74,11 +66,8 @@ INFO:root:Epoch : 4, Batches complete :10500 INFO:root:Epoch : 4, Batches complete :14000 INFO:root:Epoch : 4, Batches complete :17500 INFO:root:Epoch : 4, Batches complete :21000 -INFO:root:Epoch : 4, Batches complete :24500 -INFO:root:Epoch : 4, Batches complete :28000 -INFO:root:Epoch : 4, Batches complete :31500 INFO:root:Epoch complete :4, Computing Accuracy -INFO:root:Epochs completed : 4 Test Accuracy: 0.9254736842105263, Test Loss: 0.24117745380652578 +INFO:root:Epochs completed : 4 Test Accuracy: 0.9387894736842105, Test Loss: 0.1793042681057397 INFO:root:Epoch : 5, Batches complete :0 INFO:root:Epoch : 5, Batches complete :3500 INFO:root:Epoch : 5, Batches complete :7000 @@ -86,11 +75,8 @@ INFO:root:Epoch : 5, Batches complete :10500 INFO:root:Epoch : 5, Batches complete :14000 INFO:root:Epoch : 5, Batches complete :17500 INFO:root:Epoch : 5, Batches complete :21000 -INFO:root:Epoch : 5, Batches complete :24500 -INFO:root:Epoch : 5, Batches complete :28000 -INFO:root:Epoch : 5, Batches complete :31500 INFO:root:Epoch complete :5, Computing Accuracy -INFO:root:Epochs completed : 5 Test Accuracy: 0.9222368421052631, Test Loss: 0.24092118442058563 +INFO:root:Epochs completed : 5 Test Accuracy: 0.9391052631578948, Test Loss: 0.18214678083977748 INFO:root:Epoch : 6, Batches complete :0 INFO:root:Epoch : 6, Batches complete :3500 INFO:root:Epoch : 6, Batches complete :7000 @@ -98,11 +84,8 @@ INFO:root:Epoch : 6, Batches complete :10500 INFO:root:Epoch : 6, Batches complete :14000 INFO:root:Epoch : 6, Batches complete :17500 INFO:root:Epoch : 6, Batches complete :21000 -INFO:root:Epoch : 6, Batches complete :24500 -INFO:root:Epoch : 6, Batches complete :28000 -INFO:root:Epoch : 6, Batches complete :31500 INFO:root:Epoch complete :6, Computing Accuracy -INFO:root:Epochs completed : 6 Test Accuracy: 0.9344473684210526, Test Loss: 0.23799640959814977 +INFO:root:Epochs completed : 6 Test Accuracy: 0.9394473684210526, Test Loss: 0.17967952292745912 INFO:root:Epoch : 7, Batches complete :0 INFO:root:Epoch : 7, Batches complete :3500 INFO:root:Epoch : 7, Batches complete :7000 @@ -110,11 +93,8 @@ INFO:root:Epoch : 7, Batches complete :10500 INFO:root:Epoch : 7, Batches complete :14000 INFO:root:Epoch : 7, Batches complete :17500 INFO:root:Epoch : 7, Batches complete :21000 -INFO:root:Epoch : 7, Batches complete :24500 -INFO:root:Epoch : 7, Batches complete :28000 -INFO:root:Epoch : 7, Batches complete :31500 INFO:root:Epoch complete :7, Computing Accuracy -INFO:root:Epochs completed : 7 Test Accuracy: 0.9389473684210526, Test Loss: 0.2333494793427618 +INFO:root:Epochs completed : 7 Test Accuracy: 0.9392631578947368, Test Loss: 0.17987134655604234 INFO:root:Epoch : 8, Batches complete :0 INFO:root:Epoch : 8, Batches complete :3500 INFO:root:Epoch : 8, Batches complete :7000 @@ -122,11 +102,8 @@ INFO:root:Epoch : 8, Batches complete :10500 INFO:root:Epoch : 8, Batches complete :14000 INFO:root:Epoch : 8, Batches complete :17500 INFO:root:Epoch : 8, Batches complete :21000 -INFO:root:Epoch : 8, Batches complete :24500 -INFO:root:Epoch : 8, Batches complete :28000 -INFO:root:Epoch : 8, Batches complete :31500 INFO:root:Epoch complete :8, Computing Accuracy -INFO:root:Epochs completed : 8 Test Accuracy: 0.9396842105263158, Test Loss: 0.23098136014059972 +INFO:root:Epochs completed : 8 Test Accuracy: 0.9397105263157894, Test Loss: 0.17990990590706102 INFO:root:Epoch : 9, Batches complete :0 INFO:root:Epoch : 9, Batches complete :3500 INFO:root:Epoch : 9, Batches complete :7000 @@ -134,188 +111,5 @@ INFO:root:Epoch : 9, Batches complete :10500 INFO:root:Epoch : 9, Batches complete :14000 INFO:root:Epoch : 9, Batches complete :17500 INFO:root:Epoch : 9, Batches complete :21000 -INFO:root:Epoch : 9, Batches complete :24500 -INFO:root:Epoch : 9, Batches complete :28000 -INFO:root:Epoch : 9, Batches complete :31500 INFO:root:Epoch complete :9, Computing Accuracy -INFO:root:Epochs completed : 9 Test Accuracy: 0.9393684210526316, Test Loss: 0.23061453590267578 -INFO:root:Epoch : 10, Batches complete :0 -INFO:root:Epoch : 10, Batches complete :3500 -INFO:root:Epoch : 10, Batches complete :7000 -INFO:root:Epoch : 10, Batches complete :10500 -INFO:root:Epoch : 10, Batches complete :14000 -INFO:root:Epoch : 10, Batches complete :17500 -INFO:root:Epoch : 10, Batches complete :21000 -INFO:root:Epoch : 10, Batches complete :24500 -INFO:root:Epoch : 10, Batches complete :28000 -INFO:root:Epoch : 10, Batches complete :31500 -INFO:root:Epoch complete :10, Computing Accuracy -INFO:root:Epochs completed : 10 Test Accuracy: 0.939078947368421, Test Loss: 0.2299579507426212 -INFO:root:Epoch : 11, Batches complete :0 -INFO:root:Epoch : 11, Batches complete :3500 -INFO:root:Epoch : 11, Batches complete :7000 -INFO:root:Epoch : 11, Batches complete :10500 -INFO:root:Epoch : 11, Batches complete :14000 -INFO:root:Epoch : 11, Batches complete :17500 -INFO:root:Epoch : 11, Batches complete :21000 -INFO:root:Epoch : 11, Batches complete :24500 -INFO:root:Epoch : 11, Batches complete :28000 -INFO:root:Epoch : 11, Batches complete :31500 -INFO:root:Epoch complete :11, Computing Accuracy -INFO:root:Epochs completed : 11 Test Accuracy: 0.9396315789473684, Test Loss: 0.22818019986152643 -INFO:root:Epoch : 12, Batches complete :0 -INFO:root:Epoch : 12, Batches complete :3500 -INFO:root:Epoch : 12, Batches complete :7000 -INFO:root:Epoch : 12, Batches complete :10500 -INFO:root:Epoch : 12, Batches complete :14000 -INFO:root:Epoch : 12, Batches complete :17500 -INFO:root:Epoch : 12, Batches complete :21000 -INFO:root:Epoch : 12, Batches complete :24500 -INFO:root:Epoch : 12, Batches complete :28000 -INFO:root:Epoch : 12, Batches complete :31500 -INFO:root:Epoch complete :12, Computing Accuracy -INFO:root:Epochs completed : 12 Test Accuracy: 0.9397105263157894, Test Loss: 0.2271842305597506 -INFO:root:Epoch : 13, Batches complete :0 -INFO:root:Epoch : 13, Batches complete :3500 -INFO:root:Epoch : 13, Batches complete :7000 -INFO:root:Epoch : 13, Batches complete :10500 -INFO:root:Epoch : 13, Batches complete :14000 -INFO:root:Epoch : 13, Batches complete :17500 -INFO:root:Epoch : 13, Batches complete :21000 -INFO:root:Epoch : 13, Batches complete :24500 -INFO:root:Epoch : 13, Batches complete :28000 -INFO:root:Epoch : 13, Batches complete :31500 -INFO:root:Epoch complete :13, Computing Accuracy -INFO:root:Epochs completed : 13 Test Accuracy: 0.9396842105263158, Test Loss: 0.22670920977466985 -INFO:root:Epoch : 14, Batches complete :0 -INFO:root:Epoch : 14, Batches complete :3500 -INFO:root:Epoch : 14, Batches complete :7000 -INFO:root:Epoch : 14, Batches complete :10500 -INFO:root:Epoch : 14, Batches complete :14000 -INFO:root:Epoch : 14, Batches complete :17500 -INFO:root:Epoch : 14, Batches complete :21000 -INFO:root:Epoch : 14, Batches complete :24500 -INFO:root:Epoch : 14, Batches complete :28000 -INFO:root:Epoch : 14, Batches complete :31500 -INFO:root:Epoch complete :14, Computing Accuracy -INFO:root:Epochs completed : 14 Test Accuracy: 0.9396578947368421, Test Loss: 0.22640130080674822 -INFO:root:Epoch : 15, Batches complete :0 -INFO:root:Epoch : 15, Batches complete :3500 -INFO:root:Epoch : 15, Batches complete :7000 -INFO:root:Epoch : 15, Batches complete :10500 -INFO:root:Epoch : 15, Batches complete :14000 -INFO:root:Epoch : 15, Batches complete :17500 -INFO:root:Epoch : 15, Batches complete :21000 -INFO:root:Epoch : 15, Batches complete :24500 -INFO:root:Epoch : 15, Batches complete :28000 -INFO:root:Epoch : 15, Batches complete :31500 -INFO:root:Epoch complete :15, Computing Accuracy -INFO:root:Epochs completed : 15 Test Accuracy: 0.9397105263157894, Test Loss: 0.22627556167150797 -INFO:root:Epoch : 16, Batches complete :0 -INFO:root:Epoch : 16, Batches complete :3500 -INFO:root:Epoch : 16, Batches complete :7000 -INFO:root:Epoch : 16, Batches complete :10500 -INFO:root:Epoch : 16, Batches complete :14000 -INFO:root:Epoch : 16, Batches complete :17500 -INFO:root:Epoch : 16, Batches complete :21000 -INFO:root:Epoch : 16, Batches complete :24500 -INFO:root:Epoch : 16, Batches complete :28000 -INFO:root:Epoch : 16, Batches complete :31500 -INFO:root:Epoch complete :16, Computing Accuracy -INFO:root:Epochs completed : 16 Test Accuracy: 0.9396842105263158, Test Loss: 0.22619763173555074 -INFO:root:Epoch : 17, Batches complete :0 -INFO:root:Epoch : 17, Batches complete :3500 -INFO:root:Epoch : 17, Batches complete :7000 -INFO:root:Epoch : 17, Batches complete :10500 -INFO:root:Epoch : 17, Batches complete :14000 -INFO:root:Epoch : 17, Batches complete :17500 -INFO:root:Epoch : 17, Batches complete :21000 -INFO:root:Epoch : 17, Batches complete :24500 -INFO:root:Epoch : 17, Batches complete :28000 -INFO:root:Epoch : 17, Batches complete :31500 -INFO:root:Epoch complete :17, Computing Accuracy -INFO:root:Epochs completed : 17 Test Accuracy: 0.9396842105263158, Test Loss: 0.22615978984456314 -INFO:root:Epoch : 18, Batches complete :0 -INFO:root:Epoch : 18, Batches complete :3500 -INFO:root:Epoch : 18, Batches complete :7000 -INFO:root:Epoch : 18, Batches complete :10500 -INFO:root:Epoch : 18, Batches complete :14000 -INFO:root:Epoch : 18, Batches complete :17500 -INFO:root:Epoch : 18, Batches complete :21000 -INFO:root:Epoch : 18, Batches complete :24500 -INFO:root:Epoch : 18, Batches complete :28000 -INFO:root:Epoch : 18, Batches complete :31500 -INFO:root:Epoch complete :18, Computing Accuracy -INFO:root:Epochs completed : 18 Test Accuracy: 0.9396842105263158, Test Loss: 0.226155886524602 -INFO:root:Epoch : 19, Batches complete :0 -INFO:root:Epoch : 19, Batches complete :3500 -INFO:root:Epoch : 19, Batches complete :7000 -INFO:root:Epoch : 19, Batches complete :10500 -INFO:root:Epoch : 19, Batches complete :14000 -INFO:root:Epoch : 19, Batches complete :17500 -INFO:root:Epoch : 19, Batches complete :21000 -INFO:root:Epoch : 19, Batches complete :24500 -INFO:root:Epoch : 19, Batches complete :28000 -INFO:root:Epoch : 19, Batches complete :31500 -INFO:root:Epoch complete :19, Computing Accuracy -INFO:root:Epochs completed : 19 Test Accuracy: 0.9396842105263158, Test Loss: 0.2261487394571305 -INFO:root:Epoch : 20, Batches complete :0 -INFO:root:Epoch : 20, Batches complete :3500 -INFO:root:Epoch : 20, Batches complete :7000 -INFO:root:Epoch : 20, Batches complete :10500 -INFO:root:Epoch : 20, Batches complete :14000 -INFO:root:Epoch : 20, Batches complete :17500 -INFO:root:Epoch : 20, Batches complete :21000 -INFO:root:Epoch : 20, Batches complete :24500 -INFO:root:Epoch : 20, Batches complete :28000 -INFO:root:Epoch : 20, Batches complete :31500 -INFO:root:Epoch complete :20, Computing Accuracy -INFO:root:Epochs completed : 20 Test Accuracy: 0.9396842105263158, Test Loss: 0.22614345817189463 -INFO:root:Epoch : 21, Batches complete :0 -INFO:root:Epoch : 21, Batches complete :3500 -INFO:root:Epoch : 21, Batches complete :7000 -INFO:root:Epoch : 21, Batches complete :10500 -INFO:root:Epoch : 21, Batches complete :14000 -INFO:root:Epoch : 21, Batches complete :17500 -INFO:root:Epoch : 21, Batches complete :21000 -INFO:root:Epoch : 21, Batches complete :24500 -INFO:root:Epoch : 21, Batches complete :28000 -INFO:root:Epoch : 21, Batches complete :31500 -INFO:root:Epoch complete :21, Computing Accuracy -INFO:root:Epochs completed : 21 Test Accuracy: 0.9396842105263158, Test Loss: 0.22614103555679319 -INFO:root:Epoch : 22, Batches complete :0 -INFO:root:Epoch : 22, Batches complete :3500 -INFO:root:Epoch : 22, Batches complete :7000 -INFO:root:Epoch : 22, Batches complete :10500 -INFO:root:Epoch : 22, Batches complete :14000 -INFO:root:Epoch : 22, Batches complete :17500 -INFO:root:Epoch : 22, Batches complete :21000 -INFO:root:Epoch : 22, Batches complete :24500 -INFO:root:Epoch : 22, Batches complete :28000 -INFO:root:Epoch : 22, Batches complete :31500 -INFO:root:Epoch complete :22, Computing Accuracy -INFO:root:Epochs completed : 22 Test Accuracy: 0.9396842105263158, Test Loss: 0.22614137593068567 -INFO:root:Epoch : 23, Batches complete :0 -INFO:root:Epoch : 23, Batches complete :3500 -INFO:root:Epoch : 23, Batches complete :7000 -INFO:root:Epoch : 23, Batches complete :10500 -INFO:root:Epoch : 23, Batches complete :14000 -INFO:root:Epoch : 23, Batches complete :17500 -INFO:root:Epoch : 23, Batches complete :21000 -INFO:root:Epoch : 23, Batches complete :24500 -INFO:root:Epoch : 23, Batches complete :28000 -INFO:root:Epoch : 23, Batches complete :31500 -INFO:root:Epoch complete :23, Computing Accuracy -INFO:root:Epochs completed : 23 Test Accuracy: 0.9396842105263158, Test Loss: 0.22614216177087082 -INFO:root:Epoch : 24, Batches complete :0 -INFO:root:Epoch : 24, Batches complete :3500 -INFO:root:Epoch : 24, Batches complete :7000 -INFO:root:Epoch : 24, Batches complete :10500 -INFO:root:Epoch : 24, Batches complete :14000 -INFO:root:Epoch : 24, Batches complete :17500 -INFO:root:Epoch : 24, Batches complete :21000 -INFO:root:Epoch : 24, Batches complete :24500 -INFO:root:Epoch : 24, Batches complete :28000 -INFO:root:Epoch : 24, Batches complete :31500 -INFO:root:Epoch complete :24, Computing Accuracy -INFO:root:Epochs completed : 24 Test Accuracy: 0.9396842105263158, Test Loss: 0.22614260958997826 +INFO:root:Epochs completed : 9 Test Accuracy: 0.9394736842105263, Test Loss: 0.1796451361074455 From 66ba8a2dad1b64fe96599f059fcbedd12e5992e8 Mon Sep 17 00:00:00 2001 From: Ubuntu Date: Mon, 11 Feb 2019 17:40:29 +0000 Subject: [PATCH 2/2] Adding logs with updated script for Text Classification --- .../logs/classification/fasttext-ag-news.log | 63 ++++++++--------- .../logs/classification/fasttext-dbpedia.log | 67 ++++++++++--------- .../classification/fasttext-yelp-review.log | 31 ++++----- 3 files changed, 84 insertions(+), 77 deletions(-) diff --git a/gluonnlp/logs/classification/fasttext-ag-news.log b/gluonnlp/logs/classification/fasttext-ag-news.log index 66f87e013..3c14f6047 100644 --- a/gluonnlp/logs/classification/fasttext-ag-news.log +++ b/gluonnlp/logs/classification/fasttext-ag-news.log @@ -1,21 +1,24 @@ /home/ubuntu/anaconda3/lib/python3.6/site-packages/h5py/__init__.py:36: FutureWarning: Conversion of the second argument of issubdtype from `float` to `np.floating` is deprecated. In future, it will be treated as `np.float64 == np.dtype(float).type`. from ._conv import register_converters as _register_converters -INFO:root:Ngrams range for the training run : 1 +INFO:root:Ngrams range for the training run : 2 INFO:root:Loading Training data INFO:root:Opening file /dev/shm/fastText/data/ag_news.train for reading input INFO:root:Loading Test data INFO:root:Opening file /dev/shm/fastText/data/ag_news.test for reading input INFO:root:Vocabulary size: 95814 INFO:root:Training data converting to sequences... -INFO:root:Done! Sequence conversion Time=15.48s, #Sentences=120000 -INFO:root:Done! Sequence conversion Time=15.33s, #Sentences=7600 +INFO:root:Done! Sequence conversion Time=16.82s, #Sentences=120000 +INFO:root:Done! Sequence conversion Time=16.32s, #Sentences=7600 +INFO:root:Adding 2-gram features +INFO:root:Added n-gram features to train and test datasets!! INFO:root:Encoding labels INFO:root:Label mapping:{'__label__1': 0, '__label__2': 1, '__label__3': 2, '__label__4': 3} -INFO:root:Done! Preprocessing Time=2.25s, #Sentences=120000 -INFO:root:Done! Preprocessing Time=1.00s, #Sentences=7600 +INFO:root:Done! Preprocessing Time=3.17s, #Sentences=120000 +INFO:root:Done! Preprocessing Time=1.59s, #Sentences=7600 INFO:root:Number of labels: 4 INFO:root:Initializing network INFO:root:Running Training on ctx:gpu(0) +INFO:root:Embedding Matrix Length:1252686 INFO:root:Number of output units in the last layer :4 INFO:root:Network initialized INFO:root:Loss function for training:SoftmaxCrossEntropyLoss(batch_axis=0, w=None) @@ -33,7 +36,7 @@ INFO:root:Epoch : 0, Batches complete :5250 INFO:root:Epoch : 0, Batches complete :6000 INFO:root:Epoch : 0, Batches complete :6750 INFO:root:Epoch complete :0, Computing Accuracy -INFO:root:Epochs completed : 0 Test Accuracy: 0.8764473684210526, Test Loss: 1.3566422615977125 +INFO:root:Epochs completed : 0 Test Accuracy: 0.9272368421052631, Test Loss: 0.23818149359994806 INFO:root:Epoch : 1, Batches complete :0 INFO:root:Epoch : 1, Batches complete :750 INFO:root:Epoch : 1, Batches complete :1500 @@ -45,7 +48,7 @@ INFO:root:Epoch : 1, Batches complete :5250 INFO:root:Epoch : 1, Batches complete :6000 INFO:root:Epoch : 1, Batches complete :6750 INFO:root:Epoch complete :1, Computing Accuracy -INFO:root:Epochs completed : 1 Test Accuracy: 0.8873684210526316, Test Loss: 0.8527715157881738 +INFO:root:Epochs completed : 1 Test Accuracy: 0.9247368421052632, Test Loss: 0.29014398449394646 INFO:root:Epoch : 2, Batches complete :0 INFO:root:Epoch : 2, Batches complete :750 INFO:root:Epoch : 2, Batches complete :1500 @@ -57,7 +60,7 @@ INFO:root:Epoch : 2, Batches complete :5250 INFO:root:Epoch : 2, Batches complete :6000 INFO:root:Epoch : 2, Batches complete :6750 INFO:root:Epoch complete :2, Computing Accuracy -INFO:root:Epochs completed : 2 Test Accuracy: 0.8928947368421053, Test Loss: 0.5572469649001756 +INFO:root:Epochs completed : 2 Test Accuracy: 0.9226315789473685, Test Loss: 0.3575628486603624 INFO:root:Epoch : 3, Batches complete :0 INFO:root:Epoch : 3, Batches complete :750 INFO:root:Epoch : 3, Batches complete :1500 @@ -69,7 +72,7 @@ INFO:root:Epoch : 3, Batches complete :5250 INFO:root:Epoch : 3, Batches complete :6000 INFO:root:Epoch : 3, Batches complete :6750 INFO:root:Epoch complete :3, Computing Accuracy -INFO:root:Epochs completed : 3 Test Accuracy: 0.9010526315789473, Test Loss: 0.4343520502311086 +INFO:root:Epochs completed : 3 Test Accuracy: 0.9219736842105263, Test Loss: 0.4178947208634587 INFO:root:Epoch : 4, Batches complete :0 INFO:root:Epoch : 4, Batches complete :750 INFO:root:Epoch : 4, Batches complete :1500 @@ -81,7 +84,7 @@ INFO:root:Epoch : 4, Batches complete :5250 INFO:root:Epoch : 4, Batches complete :6000 INFO:root:Epoch : 4, Batches complete :6750 INFO:root:Epoch complete :4, Computing Accuracy -INFO:root:Epochs completed : 4 Test Accuracy: 0.9067105263157895, Test Loss: 0.4059215528569428 +INFO:root:Epochs completed : 4 Test Accuracy: 0.9225, Test Loss: 0.4478347347173829 INFO:root:Epoch : 5, Batches complete :0 INFO:root:Epoch : 5, Batches complete :750 INFO:root:Epoch : 5, Batches complete :1500 @@ -93,7 +96,7 @@ INFO:root:Epoch : 5, Batches complete :5250 INFO:root:Epoch : 5, Batches complete :6000 INFO:root:Epoch : 5, Batches complete :6750 INFO:root:Epoch complete :5, Computing Accuracy -INFO:root:Epochs completed : 5 Test Accuracy: 0.9067105263157895, Test Loss: 0.39512876059492386 +INFO:root:Epochs completed : 5 Test Accuracy: 0.9223684210526316, Test Loss: 0.46587714708614214 INFO:root:Epoch : 6, Batches complete :0 INFO:root:Epoch : 6, Batches complete :750 INFO:root:Epoch : 6, Batches complete :1500 @@ -105,7 +108,7 @@ INFO:root:Epoch : 6, Batches complete :5250 INFO:root:Epoch : 6, Batches complete :6000 INFO:root:Epoch : 6, Batches complete :6750 INFO:root:Epoch complete :6, Computing Accuracy -INFO:root:Epochs completed : 6 Test Accuracy: 0.9088157894736842, Test Loss: 0.3879565375254762 +INFO:root:Epochs completed : 6 Test Accuracy: 0.9228947368421052, Test Loss: 0.4737367654729097 INFO:root:Epoch : 7, Batches complete :0 INFO:root:Epoch : 7, Batches complete :750 INFO:root:Epoch : 7, Batches complete :1500 @@ -117,7 +120,7 @@ INFO:root:Epoch : 7, Batches complete :5250 INFO:root:Epoch : 7, Batches complete :6000 INFO:root:Epoch : 7, Batches complete :6750 INFO:root:Epoch complete :7, Computing Accuracy -INFO:root:Epochs completed : 7 Test Accuracy: 0.9076315789473685, Test Loss: 0.3896589593266408 +INFO:root:Epochs completed : 7 Test Accuracy: 0.9222368421052631, Test Loss: 0.4784198134985576 INFO:root:Epoch : 8, Batches complete :0 INFO:root:Epoch : 8, Batches complete :750 INFO:root:Epoch : 8, Batches complete :1500 @@ -129,7 +132,7 @@ INFO:root:Epoch : 8, Batches complete :5250 INFO:root:Epoch : 8, Batches complete :6000 INFO:root:Epoch : 8, Batches complete :6750 INFO:root:Epoch complete :8, Computing Accuracy -INFO:root:Epochs completed : 8 Test Accuracy: 0.9064473684210527, Test Loss: 0.3931363523272971 +INFO:root:Epochs completed : 8 Test Accuracy: 0.9218421052631579, Test Loss: 0.48082475678738923 INFO:root:Epoch : 9, Batches complete :0 INFO:root:Epoch : 9, Batches complete :750 INFO:root:Epoch : 9, Batches complete :1500 @@ -141,7 +144,7 @@ INFO:root:Epoch : 9, Batches complete :5250 INFO:root:Epoch : 9, Batches complete :6000 INFO:root:Epoch : 9, Batches complete :6750 INFO:root:Epoch complete :9, Computing Accuracy -INFO:root:Epochs completed : 9 Test Accuracy: 0.9069736842105263, Test Loss: 0.39174262453795794 +INFO:root:Epochs completed : 9 Test Accuracy: 0.9219736842105263, Test Loss: 0.48236229044004497 INFO:root:Epoch : 10, Batches complete :0 INFO:root:Epoch : 10, Batches complete :750 INFO:root:Epoch : 10, Batches complete :1500 @@ -153,7 +156,7 @@ INFO:root:Epoch : 10, Batches complete :5250 INFO:root:Epoch : 10, Batches complete :6000 INFO:root:Epoch : 10, Batches complete :6750 INFO:root:Epoch complete :10, Computing Accuracy -INFO:root:Epochs completed : 10 Test Accuracy: 0.906578947368421, Test Loss: 0.3927288375869026 +INFO:root:Epochs completed : 10 Test Accuracy: 0.9221052631578948, Test Loss: 0.48294173663551476 INFO:root:Epoch : 11, Batches complete :0 INFO:root:Epoch : 11, Batches complete :750 INFO:root:Epoch : 11, Batches complete :1500 @@ -165,7 +168,7 @@ INFO:root:Epoch : 11, Batches complete :5250 INFO:root:Epoch : 11, Batches complete :6000 INFO:root:Epoch : 11, Batches complete :6750 INFO:root:Epoch complete :11, Computing Accuracy -INFO:root:Epochs completed : 11 Test Accuracy: 0.9068421052631579, Test Loss: 0.39269958834384383 +INFO:root:Epochs completed : 11 Test Accuracy: 0.9219736842105263, Test Loss: 0.48327548733156006 INFO:root:Epoch : 12, Batches complete :0 INFO:root:Epoch : 12, Batches complete :750 INFO:root:Epoch : 12, Batches complete :1500 @@ -177,7 +180,7 @@ INFO:root:Epoch : 12, Batches complete :5250 INFO:root:Epoch : 12, Batches complete :6000 INFO:root:Epoch : 12, Batches complete :6750 INFO:root:Epoch complete :12, Computing Accuracy -INFO:root:Epochs completed : 12 Test Accuracy: 0.906578947368421, Test Loss: 0.3925883776663291 +INFO:root:Epochs completed : 12 Test Accuracy: 0.9218421052631579, Test Loss: 0.48341383955952494 INFO:root:Epoch : 13, Batches complete :0 INFO:root:Epoch : 13, Batches complete :750 INFO:root:Epoch : 13, Batches complete :1500 @@ -189,7 +192,7 @@ INFO:root:Epoch : 13, Batches complete :5250 INFO:root:Epoch : 13, Batches complete :6000 INFO:root:Epoch : 13, Batches complete :6750 INFO:root:Epoch complete :13, Computing Accuracy -INFO:root:Epochs completed : 13 Test Accuracy: 0.9067105263157895, Test Loss: 0.3926985869615486 +INFO:root:Epochs completed : 13 Test Accuracy: 0.9218421052631579, Test Loss: 0.48347091130704933 INFO:root:Epoch : 14, Batches complete :0 INFO:root:Epoch : 14, Batches complete :750 INFO:root:Epoch : 14, Batches complete :1500 @@ -201,7 +204,7 @@ INFO:root:Epoch : 14, Batches complete :5250 INFO:root:Epoch : 14, Batches complete :6000 INFO:root:Epoch : 14, Batches complete :6750 INFO:root:Epoch complete :14, Computing Accuracy -INFO:root:Epochs completed : 14 Test Accuracy: 0.906578947368421, Test Loss: 0.39267066471572803 +INFO:root:Epochs completed : 14 Test Accuracy: 0.9218421052631579, Test Loss: 0.48350696036323887 INFO:root:Epoch : 15, Batches complete :0 INFO:root:Epoch : 15, Batches complete :750 INFO:root:Epoch : 15, Batches complete :1500 @@ -213,7 +216,7 @@ INFO:root:Epoch : 15, Batches complete :5250 INFO:root:Epoch : 15, Batches complete :6000 INFO:root:Epoch : 15, Batches complete :6750 INFO:root:Epoch complete :15, Computing Accuracy -INFO:root:Epochs completed : 15 Test Accuracy: 0.9067105263157895, Test Loss: 0.39267520153049473 +INFO:root:Epochs completed : 15 Test Accuracy: 0.9218421052631579, Test Loss: 0.48351032549803885 INFO:root:Epoch : 16, Batches complete :0 INFO:root:Epoch : 16, Batches complete :750 INFO:root:Epoch : 16, Batches complete :1500 @@ -225,7 +228,7 @@ INFO:root:Epoch : 16, Batches complete :5250 INFO:root:Epoch : 16, Batches complete :6000 INFO:root:Epoch : 16, Batches complete :6750 INFO:root:Epoch complete :16, Computing Accuracy -INFO:root:Epochs completed : 16 Test Accuracy: 0.9067105263157895, Test Loss: 0.3926834414547652 +INFO:root:Epochs completed : 16 Test Accuracy: 0.9218421052631579, Test Loss: 0.48350887055986097 INFO:root:Epoch : 17, Batches complete :0 INFO:root:Epoch : 17, Batches complete :750 INFO:root:Epoch : 17, Batches complete :1500 @@ -237,7 +240,7 @@ INFO:root:Epoch : 17, Batches complete :5250 INFO:root:Epoch : 17, Batches complete :6000 INFO:root:Epoch : 17, Batches complete :6750 INFO:root:Epoch complete :17, Computing Accuracy -INFO:root:Epochs completed : 17 Test Accuracy: 0.9067105263157895, Test Loss: 0.3926893989168922 +INFO:root:Epochs completed : 17 Test Accuracy: 0.9218421052631579, Test Loss: 0.483507971540666 INFO:root:Epoch : 18, Batches complete :0 INFO:root:Epoch : 18, Batches complete :750 INFO:root:Epoch : 18, Batches complete :1500 @@ -249,7 +252,7 @@ INFO:root:Epoch : 18, Batches complete :5250 INFO:root:Epoch : 18, Batches complete :6000 INFO:root:Epoch : 18, Batches complete :6750 INFO:root:Epoch complete :18, Computing Accuracy -INFO:root:Epochs completed : 18 Test Accuracy: 0.9067105263157895, Test Loss: 0.3926934099231706 +INFO:root:Epochs completed : 18 Test Accuracy: 0.9218421052631579, Test Loss: 0.4835074149108605 INFO:root:Epoch : 19, Batches complete :0 INFO:root:Epoch : 19, Batches complete :750 INFO:root:Epoch : 19, Batches complete :1500 @@ -261,7 +264,7 @@ INFO:root:Epoch : 19, Batches complete :5250 INFO:root:Epoch : 19, Batches complete :6000 INFO:root:Epoch : 19, Batches complete :6750 INFO:root:Epoch complete :19, Computing Accuracy -INFO:root:Epochs completed : 19 Test Accuracy: 0.9067105263157895, Test Loss: 0.39269088007662906 +INFO:root:Epochs completed : 19 Test Accuracy: 0.9218421052631579, Test Loss: 0.483507287394626 INFO:root:Epoch : 20, Batches complete :0 INFO:root:Epoch : 20, Batches complete :750 INFO:root:Epoch : 20, Batches complete :1500 @@ -273,7 +276,7 @@ INFO:root:Epoch : 20, Batches complete :5250 INFO:root:Epoch : 20, Batches complete :6000 INFO:root:Epoch : 20, Batches complete :6750 INFO:root:Epoch complete :20, Computing Accuracy -INFO:root:Epochs completed : 20 Test Accuracy: 0.9067105263157895, Test Loss: 0.3926890772733052 +INFO:root:Epochs completed : 20 Test Accuracy: 0.9218421052631579, Test Loss: 0.4835072638455215 INFO:root:Epoch : 21, Batches complete :0 INFO:root:Epoch : 21, Batches complete :750 INFO:root:Epoch : 21, Batches complete :1500 @@ -285,7 +288,7 @@ INFO:root:Epoch : 21, Batches complete :5250 INFO:root:Epoch : 21, Batches complete :6000 INFO:root:Epoch : 21, Batches complete :6750 INFO:root:Epoch complete :21, Computing Accuracy -INFO:root:Epochs completed : 21 Test Accuracy: 0.9067105263157895, Test Loss: 0.3926877922782257 +INFO:root:Epochs completed : 21 Test Accuracy: 0.9218421052631579, Test Loss: 0.48350725740763206 INFO:root:Epoch : 22, Batches complete :0 INFO:root:Epoch : 22, Batches complete :750 INFO:root:Epoch : 22, Batches complete :1500 @@ -297,7 +300,7 @@ INFO:root:Epoch : 22, Batches complete :5250 INFO:root:Epoch : 22, Batches complete :6000 INFO:root:Epoch : 22, Batches complete :6750 INFO:root:Epoch complete :22, Computing Accuracy -INFO:root:Epochs completed : 22 Test Accuracy: 0.9067105263157895, Test Loss: 0.39268737782607804 +INFO:root:Epochs completed : 22 Test Accuracy: 0.9218421052631579, Test Loss: 0.48350725701647607 INFO:root:Epoch : 23, Batches complete :0 INFO:root:Epoch : 23, Batches complete :750 INFO:root:Epoch : 23, Batches complete :1500 @@ -309,7 +312,7 @@ INFO:root:Epoch : 23, Batches complete :5250 INFO:root:Epoch : 23, Batches complete :6000 INFO:root:Epoch : 23, Batches complete :6750 INFO:root:Epoch complete :23, Computing Accuracy -INFO:root:Epochs completed : 23 Test Accuracy: 0.9067105263157895, Test Loss: 0.39268723316680565 +INFO:root:Epochs completed : 23 Test Accuracy: 0.9218421052631579, Test Loss: 0.4835072557101737 INFO:root:Epoch : 24, Batches complete :0 INFO:root:Epoch : 24, Batches complete :750 INFO:root:Epoch : 24, Batches complete :1500 @@ -321,4 +324,4 @@ INFO:root:Epoch : 24, Batches complete :5250 INFO:root:Epoch : 24, Batches complete :6000 INFO:root:Epoch : 24, Batches complete :6750 INFO:root:Epoch complete :24, Computing Accuracy -INFO:root:Epochs completed : 24 Test Accuracy: 0.9067105263157895, Test Loss: 0.3926871975870974 +INFO:root:Epochs completed : 24 Test Accuracy: 0.9218421052631579, Test Loss: 0.48350725605647904 diff --git a/gluonnlp/logs/classification/fasttext-dbpedia.log b/gluonnlp/logs/classification/fasttext-dbpedia.log index 23e50c963..384c26c3e 100644 --- a/gluonnlp/logs/classification/fasttext-dbpedia.log +++ b/gluonnlp/logs/classification/fasttext-dbpedia.log @@ -1,23 +1,26 @@ /home/ubuntu/anaconda3/lib/python3.6/site-packages/h5py/__init__.py:36: FutureWarning: Conversion of the second argument of issubdtype from `float` to `np.floating` is deprecated. In future, it will be treated as `np.float64 == np.dtype(float).type`. from ._conv import register_converters as _register_converters -INFO:root:Ngrams range for the training run : 1 +INFO:root:Ngrams range for the training run : 2 INFO:root:Loading Training data INFO:root:Opening file /dev/shm/fastText/data/dbpedia.train for reading input INFO:root:Loading Test data INFO:root:Opening file /dev/shm/fastText/data/dbpedia.test for reading input INFO:root:Vocabulary size: 803505 INFO:root:Training data converting to sequences... -INFO:root:Done! Sequence conversion Time=161.65s, #Sentences=560000 -INFO:root:Done! Sequence conversion Time=145.70s, #Sentences=70000 +INFO:root:Done! Sequence conversion Time=164.40s, #Sentences=560000 +INFO:root:Done! Sequence conversion Time=149.90s, #Sentences=70000 +INFO:root:Adding 2-gram features +INFO:root:Added n-gram features to train and test datasets!! INFO:root:Encoding labels INFO:root:Label mapping:{'__label__1': 0, '__label__10': 1, '__label__11': 2, '__label__12': 3, '__label__13': 4, '__label__14': 5, '__label__2': 6, '__label__3': 7, '__label__4': 8, '__label__5': 9, '__label__6': 10, '__label__7': 11, '__label__8': 12, '__label__9': 13} -INFO:root:Done! Preprocessing Time=12.20s, #Sentences=560000 -INFO:root:Done! Preprocessing Time=5.16s, #Sentences=70000 -/home/ubuntu/anaconda3/lib/python3.6/site-packages/gluonnlp/data/sampler.py:366: UserWarning: Some buckets are empty and will be removed. Unused bucket keys=[833, 907, 981, 1129, 1203, 1425] +INFO:root:Done! Preprocessing Time=18.49s, #Sentences=560000 +INFO:root:Done! Preprocessing Time=12.52s, #Sentences=70000 +/home/ubuntu/anaconda3/lib/python3.6/site-packages/gluonnlp/data/sampler.py:366: UserWarning: Some buckets are empty and will be removed. Unused bucket keys=[1656, 1805, 1954, 2252, 2401, 2848] str(unused_bucket_keys)) INFO:root:Number of labels: 14 INFO:root:Initializing network -INFO:root:Running Training on ctx:gpu(1) +INFO:root:Running Training on ctx:gpu(2) +INFO:root:Embedding Matrix Length:6328901 INFO:root:Number of output units in the last layer :14 INFO:root:Network initialized INFO:root:Loss function for training:SoftmaxCrossEntropyLoss(batch_axis=0, w=None) @@ -29,148 +32,148 @@ INFO:root:Epoch : 0, Batches complete :3500 INFO:root:Epoch : 0, Batches complete :7000 INFO:root:Epoch : 0, Batches complete :10500 INFO:root:Epoch complete :0, Computing Accuracy -INFO:root:Epochs completed : 0 Test Accuracy: 0.9699, Test Loss: 0.6863976057549881 +INFO:root:Epochs completed : 0 Test Accuracy: 0.9871, Test Loss: 0.05489529666595255 INFO:root:Epoch : 1, Batches complete :0 INFO:root:Epoch : 1, Batches complete :3500 INFO:root:Epoch : 1, Batches complete :7000 INFO:root:Epoch : 1, Batches complete :10500 INFO:root:Epoch complete :1, Computing Accuracy -INFO:root:Epochs completed : 1 Test Accuracy: 0.9768714285714286, Test Loss: 0.4500242570382416 +INFO:root:Epochs completed : 1 Test Accuracy: 0.9865714285714285, Test Loss: 0.0723079552730863 INFO:root:Epoch : 2, Batches complete :0 INFO:root:Epoch : 2, Batches complete :3500 INFO:root:Epoch : 2, Batches complete :7000 INFO:root:Epoch : 2, Batches complete :10500 INFO:root:Epoch complete :2, Computing Accuracy -INFO:root:Epochs completed : 2 Test Accuracy: 0.9772857142857143, Test Loss: 0.35363802586575893 +INFO:root:Epochs completed : 2 Test Accuracy: 0.9876857142857143, Test Loss: 0.07841473696838211 INFO:root:Epoch : 3, Batches complete :0 INFO:root:Epoch : 3, Batches complete :3500 INFO:root:Epoch : 3, Batches complete :7000 INFO:root:Epoch : 3, Batches complete :10500 INFO:root:Epoch complete :3, Computing Accuracy -INFO:root:Epochs completed : 3 Test Accuracy: 0.9792, Test Loss: 0.2845098681688672 +INFO:root:Epochs completed : 3 Test Accuracy: 0.9878571428571429, Test Loss: 0.08302891783416737 INFO:root:Epoch : 4, Batches complete :0 INFO:root:Epoch : 4, Batches complete :3500 INFO:root:Epoch : 4, Batches complete :7000 INFO:root:Epoch : 4, Batches complete :10500 INFO:root:Epoch complete :4, Computing Accuracy -INFO:root:Epochs completed : 4 Test Accuracy: 0.9794, Test Loss: 0.2565364573793349 +INFO:root:Epochs completed : 4 Test Accuracy: 0.9880571428571429, Test Loss: 0.08351624214430395 INFO:root:Epoch : 5, Batches complete :0 INFO:root:Epoch : 5, Batches complete :3500 INFO:root:Epoch : 5, Batches complete :7000 INFO:root:Epoch : 5, Batches complete :10500 INFO:root:Epoch complete :5, Computing Accuracy -INFO:root:Epochs completed : 5 Test Accuracy: 0.9788857142857142, Test Loss: 0.24630683094896577 +INFO:root:Epochs completed : 5 Test Accuracy: 0.9880857142857142, Test Loss: 0.0853581763668167 INFO:root:Epoch : 6, Batches complete :0 INFO:root:Epoch : 6, Batches complete :3500 INFO:root:Epoch : 6, Batches complete :7000 INFO:root:Epoch : 6, Batches complete :10500 INFO:root:Epoch complete :6, Computing Accuracy -INFO:root:Epochs completed : 6 Test Accuracy: 0.9786857142857143, Test Loss: 0.23837156017298708 +INFO:root:Epochs completed : 6 Test Accuracy: 0.9882285714285715, Test Loss: 0.08566870266260253 INFO:root:Epoch : 7, Batches complete :0 INFO:root:Epoch : 7, Batches complete :3500 INFO:root:Epoch : 7, Batches complete :7000 INFO:root:Epoch : 7, Batches complete :10500 INFO:root:Epoch complete :7, Computing Accuracy -INFO:root:Epochs completed : 7 Test Accuracy: 0.9786714285714285, Test Loss: 0.23524657592540643 +INFO:root:Epochs completed : 7 Test Accuracy: 0.9882714285714286, Test Loss: 0.08615422139799524 INFO:root:Epoch : 8, Batches complete :0 INFO:root:Epoch : 8, Batches complete :3500 INFO:root:Epoch : 8, Batches complete :7000 INFO:root:Epoch : 8, Batches complete :10500 INFO:root:Epoch complete :8, Computing Accuracy -INFO:root:Epochs completed : 8 Test Accuracy: 0.9787285714285714, Test Loss: 0.23481739638505386 +INFO:root:Epochs completed : 8 Test Accuracy: 0.9883, Test Loss: 0.08623038968101832 INFO:root:Epoch : 9, Batches complete :0 INFO:root:Epoch : 9, Batches complete :3500 INFO:root:Epoch : 9, Batches complete :7000 INFO:root:Epoch : 9, Batches complete :10500 INFO:root:Epoch complete :9, Computing Accuracy -INFO:root:Epochs completed : 9 Test Accuracy: 0.9787428571428571, Test Loss: 0.2338253844417883 +INFO:root:Epochs completed : 9 Test Accuracy: 0.9882857142857143, Test Loss: 0.08623541991188309 INFO:root:Epoch : 10, Batches complete :0 INFO:root:Epoch : 10, Batches complete :3500 INFO:root:Epoch : 10, Batches complete :7000 INFO:root:Epoch : 10, Batches complete :10500 INFO:root:Epoch complete :10, Computing Accuracy -INFO:root:Epochs completed : 10 Test Accuracy: 0.9786571428571429, Test Loss: 0.23401775828205204 +INFO:root:Epochs completed : 10 Test Accuracy: 0.9882714285714286, Test Loss: 0.08628520279697374 INFO:root:Epoch : 11, Batches complete :0 INFO:root:Epoch : 11, Batches complete :3500 INFO:root:Epoch : 11, Batches complete :7000 INFO:root:Epoch : 11, Batches complete :10500 INFO:root:Epoch complete :11, Computing Accuracy -INFO:root:Epochs completed : 11 Test Accuracy: 0.9786857142857143, Test Loss: 0.2339698174562463 +INFO:root:Epochs completed : 11 Test Accuracy: 0.9882714285714286, Test Loss: 0.08630248848188271 INFO:root:Epoch : 12, Batches complete :0 INFO:root:Epoch : 12, Batches complete :3500 INFO:root:Epoch : 12, Batches complete :7000 INFO:root:Epoch : 12, Batches complete :10500 INFO:root:Epoch complete :12, Computing Accuracy -INFO:root:Epochs completed : 12 Test Accuracy: 0.9786571428571429, Test Loss: 0.23381617988806827 +INFO:root:Epochs completed : 12 Test Accuracy: 0.9882714285714286, Test Loss: 0.08630765155999237 INFO:root:Epoch : 13, Batches complete :0 INFO:root:Epoch : 13, Batches complete :3500 INFO:root:Epoch : 13, Batches complete :7000 INFO:root:Epoch : 13, Batches complete :10500 INFO:root:Epoch complete :13, Computing Accuracy -INFO:root:Epochs completed : 13 Test Accuracy: 0.9786857142857143, Test Loss: 0.23380975439287707 +INFO:root:Epochs completed : 13 Test Accuracy: 0.9882714285714286, Test Loss: 0.08630833213745953 INFO:root:Epoch : 14, Batches complete :0 INFO:root:Epoch : 14, Batches complete :3500 INFO:root:Epoch : 14, Batches complete :7000 INFO:root:Epoch : 14, Batches complete :10500 INFO:root:Epoch complete :14, Computing Accuracy -INFO:root:Epochs completed : 14 Test Accuracy: 0.9786714285714285, Test Loss: 0.2338121177066216 +INFO:root:Epochs completed : 14 Test Accuracy: 0.9882714285714286, Test Loss: 0.08630744091454749 INFO:root:Epoch : 15, Batches complete :0 INFO:root:Epoch : 15, Batches complete :3500 INFO:root:Epoch : 15, Batches complete :7000 INFO:root:Epoch : 15, Batches complete :10500 INFO:root:Epoch complete :15, Computing Accuracy -INFO:root:Epochs completed : 15 Test Accuracy: 0.9786571428571429, Test Loss: 0.23381176800340597 +INFO:root:Epochs completed : 15 Test Accuracy: 0.9882714285714286, Test Loss: 0.08630753317261855 INFO:root:Epoch : 16, Batches complete :0 INFO:root:Epoch : 16, Batches complete :3500 INFO:root:Epoch : 16, Batches complete :7000 INFO:root:Epoch : 16, Batches complete :10500 INFO:root:Epoch complete :16, Computing Accuracy -INFO:root:Epochs completed : 16 Test Accuracy: 0.9786571428571429, Test Loss: 0.23380597550799498 +INFO:root:Epochs completed : 16 Test Accuracy: 0.9882714285714286, Test Loss: 0.08630713437260933 INFO:root:Epoch : 17, Batches complete :0 INFO:root:Epoch : 17, Batches complete :3500 INFO:root:Epoch : 17, Batches complete :7000 INFO:root:Epoch : 17, Batches complete :10500 INFO:root:Epoch complete :17, Computing Accuracy -INFO:root:Epochs completed : 17 Test Accuracy: 0.9786571428571429, Test Loss: 0.23380099870770082 +INFO:root:Epochs completed : 17 Test Accuracy: 0.9882714285714286, Test Loss: 0.0863069974550169 INFO:root:Epoch : 18, Batches complete :0 INFO:root:Epoch : 18, Batches complete :3500 INFO:root:Epoch : 18, Batches complete :7000 INFO:root:Epoch : 18, Batches complete :10500 INFO:root:Epoch complete :18, Computing Accuracy -INFO:root:Epochs completed : 18 Test Accuracy: 0.9786571428571429, Test Loss: 0.2337988977641527 +INFO:root:Epochs completed : 18 Test Accuracy: 0.9882714285714286, Test Loss: 0.08630689487700326 INFO:root:Epoch : 19, Batches complete :0 INFO:root:Epoch : 19, Batches complete :3500 INFO:root:Epoch : 19, Batches complete :7000 INFO:root:Epoch : 19, Batches complete :10500 INFO:root:Epoch complete :19, Computing Accuracy -INFO:root:Epochs completed : 19 Test Accuracy: 0.9786571428571429, Test Loss: 0.23379760068644875 +INFO:root:Epochs completed : 19 Test Accuracy: 0.9882714285714286, Test Loss: 0.08630685209098998 INFO:root:Epoch : 20, Batches complete :0 INFO:root:Epoch : 20, Batches complete :3500 INFO:root:Epoch : 20, Batches complete :7000 INFO:root:Epoch : 20, Batches complete :10500 INFO:root:Epoch complete :20, Computing Accuracy -INFO:root:Epochs completed : 20 Test Accuracy: 0.9786571428571429, Test Loss: 0.233796498817279 +INFO:root:Epochs completed : 20 Test Accuracy: 0.9882714285714286, Test Loss: 0.08630683661522412 INFO:root:Epoch : 21, Batches complete :0 INFO:root:Epoch : 21, Batches complete :3500 INFO:root:Epoch : 21, Batches complete :7000 INFO:root:Epoch : 21, Batches complete :10500 INFO:root:Epoch complete :21, Computing Accuracy -INFO:root:Epochs completed : 21 Test Accuracy: 0.9786571428571429, Test Loss: 0.23379624106003863 +INFO:root:Epochs completed : 21 Test Accuracy: 0.9882714285714286, Test Loss: 0.08630683572789298 INFO:root:Epoch : 22, Batches complete :0 INFO:root:Epoch : 22, Batches complete :3500 INFO:root:Epoch : 22, Batches complete :7000 INFO:root:Epoch : 22, Batches complete :10500 INFO:root:Epoch complete :22, Computing Accuracy -INFO:root:Epochs completed : 22 Test Accuracy: 0.9786571428571429, Test Loss: 0.2337961024970286 +INFO:root:Epochs completed : 22 Test Accuracy: 0.9882714285714286, Test Loss: 0.08630683480336142 INFO:root:Epoch : 23, Batches complete :0 INFO:root:Epoch : 23, Batches complete :3500 INFO:root:Epoch : 23, Batches complete :7000 INFO:root:Epoch : 23, Batches complete :10500 INFO:root:Epoch complete :23, Computing Accuracy -INFO:root:Epochs completed : 23 Test Accuracy: 0.9786571428571429, Test Loss: 0.23379605659751337 +INFO:root:Epochs completed : 23 Test Accuracy: 0.9882714285714286, Test Loss: 0.08630683479224587 INFO:root:Epoch : 24, Batches complete :0 INFO:root:Epoch : 24, Batches complete :3500 INFO:root:Epoch : 24, Batches complete :7000 INFO:root:Epoch : 24, Batches complete :10500 INFO:root:Epoch complete :24, Computing Accuracy -INFO:root:Epochs completed : 24 Test Accuracy: 0.9786571428571429, Test Loss: 0.23379605076231144 +INFO:root:Epochs completed : 24 Test Accuracy: 0.9882714285714286, Test Loss: 0.08630683455411763 diff --git a/gluonnlp/logs/classification/fasttext-yelp-review.log b/gluonnlp/logs/classification/fasttext-yelp-review.log index 8655a89ee..eeeb7471a 100644 --- a/gluonnlp/logs/classification/fasttext-yelp-review.log +++ b/gluonnlp/logs/classification/fasttext-yelp-review.log @@ -7,15 +7,16 @@ INFO:root:Loading Test data INFO:root:Opening file /dev/shm/fastText/data/yelp_review_polarity.test for reading input INFO:root:Vocabulary size: 464402 INFO:root:Training data converting to sequences... -INFO:root:Done! Sequence conversion Time=109.57s, #Sentences=560000 -INFO:root:Done! Sequence conversion Time=93.96s, #Sentences=38000 +INFO:root:Done! Sequence conversion Time=108.66s, #Sentences=560000 +INFO:root:Done! Sequence conversion Time=84.47s, #Sentences=38000 INFO:root:Encoding labels INFO:root:Label mapping:{'__label__1': 0, '__label__2': 1} -INFO:root:Done! Preprocessing Time=20.78s, #Sentences=560000 -INFO:root:Done! Preprocessing Time=14.98s, #Sentences=38000 +INFO:root:Done! Preprocessing Time=16.23s, #Sentences=560000 +INFO:root:Done! Preprocessing Time=11.63s, #Sentences=38000 INFO:root:Number of labels: 2 INFO:root:Initializing network -INFO:root:Running Training on ctx:gpu(0) +INFO:root:Running Training on ctx:gpu(1) +INFO:root:Embedding Matrix Length:464402 INFO:root:Number of output units in the last layer :1 INFO:root:Network initialized INFO:root:Changing the loss function to sigmoid since its Binary Classification @@ -31,7 +32,7 @@ INFO:root:Epoch : 0, Batches complete :14000 INFO:root:Epoch : 0, Batches complete :17500 INFO:root:Epoch : 0, Batches complete :21000 INFO:root:Epoch complete :0, Computing Accuracy -INFO:root:Epochs completed : 0 Test Accuracy: 0.9038157894736842, Test Loss: 0.3171945011025587 +INFO:root:Epochs completed : 0 Test Accuracy: 0.9386315789473684, Test Loss: 0.17391551111256184 INFO:root:Epoch : 1, Batches complete :0 INFO:root:Epoch : 1, Batches complete :3500 INFO:root:Epoch : 1, Batches complete :7000 @@ -40,7 +41,7 @@ INFO:root:Epoch : 1, Batches complete :14000 INFO:root:Epoch : 1, Batches complete :17500 INFO:root:Epoch : 1, Batches complete :21000 INFO:root:Epoch complete :1, Computing Accuracy -INFO:root:Epochs completed : 1 Test Accuracy: 0.9285263157894736, Test Loss: 0.22869067299865983 +INFO:root:Epochs completed : 1 Test Accuracy: 0.9405789473684211, Test Loss: 0.1695354722199082 INFO:root:Epoch : 2, Batches complete :0 INFO:root:Epoch : 2, Batches complete :3500 INFO:root:Epoch : 2, Batches complete :7000 @@ -49,7 +50,7 @@ INFO:root:Epoch : 2, Batches complete :14000 INFO:root:Epoch : 2, Batches complete :17500 INFO:root:Epoch : 2, Batches complete :21000 INFO:root:Epoch complete :2, Computing Accuracy -INFO:root:Epochs completed : 2 Test Accuracy: 0.9318421052631579, Test Loss: 0.2200586399126942 +INFO:root:Epochs completed : 2 Test Accuracy: 0.9403684210526316, Test Loss: 0.1735688663501488 INFO:root:Epoch : 3, Batches complete :0 INFO:root:Epoch : 3, Batches complete :3500 INFO:root:Epoch : 3, Batches complete :7000 @@ -58,7 +59,7 @@ INFO:root:Epoch : 3, Batches complete :14000 INFO:root:Epoch : 3, Batches complete :17500 INFO:root:Epoch : 3, Batches complete :21000 INFO:root:Epoch complete :3, Computing Accuracy -INFO:root:Epochs completed : 3 Test Accuracy: 0.9379736842105263, Test Loss: 0.19040078702274849 +INFO:root:Epochs completed : 3 Test Accuracy: 0.9398684210526316, Test Loss: 0.17111293666672595 INFO:root:Epoch : 4, Batches complete :0 INFO:root:Epoch : 4, Batches complete :3500 INFO:root:Epoch : 4, Batches complete :7000 @@ -67,7 +68,7 @@ INFO:root:Epoch : 4, Batches complete :14000 INFO:root:Epoch : 4, Batches complete :17500 INFO:root:Epoch : 4, Batches complete :21000 INFO:root:Epoch complete :4, Computing Accuracy -INFO:root:Epochs completed : 4 Test Accuracy: 0.9387894736842105, Test Loss: 0.1793042681057397 +INFO:root:Epochs completed : 4 Test Accuracy: 0.9405263157894737, Test Loss: 0.17405068956403758 INFO:root:Epoch : 5, Batches complete :0 INFO:root:Epoch : 5, Batches complete :3500 INFO:root:Epoch : 5, Batches complete :7000 @@ -76,7 +77,7 @@ INFO:root:Epoch : 5, Batches complete :14000 INFO:root:Epoch : 5, Batches complete :17500 INFO:root:Epoch : 5, Batches complete :21000 INFO:root:Epoch complete :5, Computing Accuracy -INFO:root:Epochs completed : 5 Test Accuracy: 0.9391052631578948, Test Loss: 0.18214678083977748 +INFO:root:Epochs completed : 5 Test Accuracy: 0.9405789473684211, Test Loss: 0.17518507200646147 INFO:root:Epoch : 6, Batches complete :0 INFO:root:Epoch : 6, Batches complete :3500 INFO:root:Epoch : 6, Batches complete :7000 @@ -85,7 +86,7 @@ INFO:root:Epoch : 6, Batches complete :14000 INFO:root:Epoch : 6, Batches complete :17500 INFO:root:Epoch : 6, Batches complete :21000 INFO:root:Epoch complete :6, Computing Accuracy -INFO:root:Epochs completed : 6 Test Accuracy: 0.9394473684210526, Test Loss: 0.17967952292745912 +INFO:root:Epochs completed : 6 Test Accuracy: 0.9404736842105264, Test Loss: 0.17528187642187631 INFO:root:Epoch : 7, Batches complete :0 INFO:root:Epoch : 7, Batches complete :3500 INFO:root:Epoch : 7, Batches complete :7000 @@ -94,7 +95,7 @@ INFO:root:Epoch : 7, Batches complete :14000 INFO:root:Epoch : 7, Batches complete :17500 INFO:root:Epoch : 7, Batches complete :21000 INFO:root:Epoch complete :7, Computing Accuracy -INFO:root:Epochs completed : 7 Test Accuracy: 0.9392631578947368, Test Loss: 0.17987134655604234 +INFO:root:Epochs completed : 7 Test Accuracy: 0.9402631578947368, Test Loss: 0.17542641548204635 INFO:root:Epoch : 8, Batches complete :0 INFO:root:Epoch : 8, Batches complete :3500 INFO:root:Epoch : 8, Batches complete :7000 @@ -103,7 +104,7 @@ INFO:root:Epoch : 8, Batches complete :14000 INFO:root:Epoch : 8, Batches complete :17500 INFO:root:Epoch : 8, Batches complete :21000 INFO:root:Epoch complete :8, Computing Accuracy -INFO:root:Epochs completed : 8 Test Accuracy: 0.9397105263157894, Test Loss: 0.17990990590706102 +INFO:root:Epochs completed : 8 Test Accuracy: 0.9403157894736842, Test Loss: 0.17549111750584542 INFO:root:Epoch : 9, Batches complete :0 INFO:root:Epoch : 9, Batches complete :3500 INFO:root:Epoch : 9, Batches complete :7000 @@ -112,4 +113,4 @@ INFO:root:Epoch : 9, Batches complete :14000 INFO:root:Epoch : 9, Batches complete :17500 INFO:root:Epoch : 9, Batches complete :21000 INFO:root:Epoch complete :9, Computing Accuracy -INFO:root:Epochs completed : 9 Test Accuracy: 0.9394736842105263, Test Loss: 0.1796451361074455 +INFO:root:Epochs completed : 9 Test Accuracy: 0.9402894736842106, Test Loss: 0.17581923065256178