import numpy as np
# hist = {'acc': [0.60170666666666661, 0.64970666666666665, 0.67247999999999997, 0.70096000000000003, 0.72831999999999997, 0.75327999999999995, 0.79210666666666663, 0.83685333333333334, 0.89738666666666667, 0.94869333333333339, 0.98768, 0.99856, 0.99978666666666671, 0.9998933333333333, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0], 'loss': [0.67599039871851607, 0.64008198080062861, 0.61161179876963301, 0.58364227013905845, 0.55147493773142497, 0.51707415517807009, 0.46878006409645079, 0.40509848320325215, 0.31960229801177981, 0.23928055049419403, 0.1614533010260264, 0.10840653987010319, 0.078473922821680711, 0.061212156519095104, 0.050844819813569385, 0.043658380607366563, 0.038931761085589725, 0.034905506468613942, 0.031930986449718472, 0.029555683100223541], 'batch': [72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72], 'val_acc': [0.50319999999999998, 0.66639999999999999, 0.60928000000000004, 0.53503999999999996, 0.51727999999999996, 0.66991999999999996, 0.59023999999999999, 0.73343999999999998, 0.72575999999999996, 0.63888, 0.68000000000000005, 0.75280000000000002, 0.73392000000000002, 0.76048000000000004, 0.73775999999999997, 0.76719999999999999, 0.76271999999999995, 0.76256000000000002, 0.76383999999999996, 0.76304000000000005], 'val_loss': [0.75814045246124273, 0.62419310464859012, 0.65664560201644895, 0.93560365699768067, 1.0031634732627868, 0.62035980564117432, 0.77652886445999147, 0.54206495063781734, 0.54205195611953738, 0.72585166383743283, 0.67904411331176762, 0.51066716083526609, 0.56879334230422973, 0.50325737421035766, 0.565705334186554, 0.50501513553619382, 0.51068809757232669, 0.51375373683929448, 0.51847371002197262, 0.52685898157119748], 'size': [127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127]}
# hist = {'acc': [0.61040000000000005, 0.66965333333333332, 0.71269333333333329, 0.74261333333333335, 0.76970666666666665, 0.78549333333333338, 0.80197333333333332, 0.81872, 0.84133333333333338, 0.86138666666666663, 0.88234666666666661, 0.91221333333333332, 0.93493333333333328, 0.95573333333333332, 0.97338666666666662, 0.98154666666666668, 0.98912, 0.99407999999999996, 0.99754666666666669, 0.99914666666666663], 'loss': [0.66229341925303142, 0.61037688517888389, 0.56105807796478269, 0.5257215232054393, 0.48902832611719765, 0.46184740505854288, 0.42996074739456175, 0.40144161385854088, 0.35829173561731975, 0.32654467482248944, 0.28088018836657208, 0.23035042788187662, 0.18728675130685171, 0.14588080277283985, 0.10805082000096639, 0.083060047481854762, 0.063971798425515494, 0.048059171452919644, 0.034843711685736974, 0.024511216193437577], 'batch': [292, 292, 292, 292, 292, 292, 292, 292, 292, 292, 292, 292, 292, 292, 292, 292, 292, 292, 292, 292], 'val_acc': [0.50495999999999996, 0.65007999999999999, 0.66703999999999997, 0.73760000000000003, 0.74831999999999999, 0.7792, 0.74319999999999997, 0.74480000000000002, 0.76768000000000003, 0.77983999999999998, 0.75600000000000001, 0.76127999999999996, 0.76207999999999998, 0.75551999999999997, 0.76959999999999995, 0.77327999999999997, 0.75744, 0.74095999999999995, 0.76207999999999998, 0.76432], 'val_loss': [0.85289827960968012, 0.61938058338165281, 0.60033894657135012, 0.53840571493148803, 0.51515883089065551, 0.47567841200828553, 0.54509489851951598, 0.55246049943923947, 0.49265963602066037, 0.48533072179794312, 0.55839545064926144, 0.55713994558334345, 0.59176110905647283, 0.61099106838226314, 0.57528177835464478, 0.58856903702735897, 0.65395764139175416, 0.77298401973724362, 0.68928052658081052, 0.65886097120285037], 'size': [31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31]}
# hist = {'acc': [0.60842666666666667, 0.66496, 0.70799999999999996, 0.74319999999999997, 0.76719999999999999, 0.78591999999999995, 0.80047999999999997, 0.81999999999999995, 0.83813333333333329, 0.86160000000000003, 0.88549333333333335, 0.91013333333333335, 0.92858666666666667, 0.9496, 0.96981333333333331, 0.98197333333333336, 0.98794666666666664, 0.99456, 0.99695999999999996, 0.99754666666666669, 0.99925333333333333, 0.99936000000000003, 0.9998933333333333, 0.9998933333333333, 0.99983999999999995, 0.99994666666666665, 0.99983999999999995, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0], 'loss': [0.66240078449249262, 0.61301115545908613, 0.56650861356099447, 0.52666178926467899, 0.49086858425140378, 0.46030765804608664, 0.43432388045310977, 0.39819696858406067, 0.36649336884180705, 0.33039594181378684, 0.28322263444264728, 0.23331937576611836, 0.19571519700368245, 0.15482046542803446, 0.11591709202289581, 0.086087764985958729, 0.067531267909208936, 0.049765399232705433, 0.035450270514289541, 0.029474592960675557, 0.022904746125936508, 0.018450904572010041, 0.014534764552215735, 0.0134843383474648, 0.012718115153312682, 0.010768842419087887, 0.010740207039515177, 0.0085216235853234935, 0.0075080361364781856, 0.0067496916103363036, 0.0065559151982019347, 0.0055863112429281074, 0.0056592495764295264, 0.0055201838895678522, 0.0049493034219990177, 0.0045409350671619178, 0.0042915554307897882, 0.0041260089698682226, 0.0045062989238649608, 0.0040759931686023872, 0.0041205350280801457, 0.0039253659020860986, 0.003558775956208507, 0.0033647228382527828, 0.0031103958547860386, 0.0031776673414558171, 0.0030192559991901119, 0.0029129640011489391, 0.0028474370118354757, 0.003024212182847162, 0.002913796332279841, 0.002834449345084528, 0.0029427745144069194, 0.002641335375420749, 0.0023857027138769627, 0.0023533324800928432, 0.0023200609461218121, 0.0023001326639950277, 0.0023025003504008055, 0.0023820328418289621], 'batch': [292, 292, 292, 292, 292, 292, 292, 292, 292, 292, 292, 292, 292, 292, 292, 292, 292, 292, 292, 292, 292, 292, 292, 292, 292, 292, 292, 292, 292, 292, 292, 292, 292, 292, 292, 292, 292, 292, 292, 292, 292, 292, 292, 292, 292, 292, 292, 292, 292, 292, 292, 292, 292, 292, 292, 292, 292, 292, 292, 292], 'val_acc': [0.50848000000000004, 0.65456000000000003, 0.65744000000000002, 0.69023999999999996, 0.77215999999999996, 0.76832, 0.60399999999999998, 0.75519999999999998, 0.748, 0.52976000000000001, 0.72255999999999998, 0.73760000000000003, 0.76863999999999999, 0.74080000000000001, 0.76848000000000005, 0.75792000000000004, 0.76336000000000004, 0.74944, 0.75439999999999996, 0.74272000000000005, 0.70399999999999996, 0.75407999999999997, 0.75488, 0.75360000000000005, 0.75504000000000004, 0.76127999999999996, 0.76559999999999995, 0.75775999999999999, 0.75824000000000003, 0.75631999999999999, 0.75744, 0.75248000000000004, 0.75712000000000002, 0.75695999999999997, 0.75407999999999997, 0.75583999999999996, 0.75536000000000003, 0.74992000000000003, 0.75712000000000002, 0.75600000000000001, 0.75712000000000002, 0.75807999999999998, 0.75375999999999999, 0.75375999999999999, 0.75471999999999995, 0.75439999999999996, 0.75183999999999995, 0.75583999999999996, 0.75536000000000003, 0.75375999999999999, 0.75407999999999997, 0.75392000000000003, 0.75471999999999995, 0.75631999999999999, 0.75439999999999996, 0.75407999999999997, 0.75471999999999995, 0.75360000000000005, 0.75456000000000001, 0.75392000000000003], 'val_loss': [0.83099874757766723, 0.61630004909515379, 0.60988262300491336, 0.58187653435707087, 0.48209546091079714, 0.49152652966499327, 0.95987617481231691, 0.51031813723564146, 0.55518745296478267, 1.6223285962677001, 0.63996526561737066, 0.62960652519226079, 0.58113950263977054, 0.66655004633903503, 0.63060753737449649, 0.63062375366687773, 0.69096670564651486, 0.72070998303890232, 0.72822552292346954, 0.75697966092109681, 1.0030097365951538, 0.71427239350318905, 0.77823157302856449, 0.77560362388610837, 0.76769009612560268, 0.7689899741268158, 0.77246122301578524, 0.79130663941383361, 0.80737354588985444, 0.79964950931549073, 0.79939541961431504, 0.83889609127044673, 0.8254445036077499, 0.826949597966671, 0.83998052089214326, 0.83905673991203311, 0.83934639024734492, 0.88232042727947235, 0.85239349826812749, 0.85866071177005765, 0.88359404543876652, 0.86687393261194234, 0.87489767303705213, 0.8848082482099533, 0.87654798297405245, 0.88409748976230618, 0.89592284898519514, 0.89214193494558336, 0.88900369663000112, 0.89869544796228407, 0.89222350886344914, 0.90436567729473116, 0.91327436664104467, 0.91660713975667951, 0.90649745750188826, 0.9294387438964844, 0.91614944346904759, 0.91154556308746337, 0.92372855185031888, 0.91708505530834195], 'size': [31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31]}
# hist = {'acc': [0.60405333333333333, 0.67749333333333328, 0.71808000000000005, 0.75626666666666664, 0.78778666666666664, 0.82389333333333337, 0.85962666666666665, 0.90400000000000003, 0.93973333333333331, 0.95855999999999997, 0.97861333333333334, 0.97824, 0.98010666666666668, 0.9809066666666667, 0.98186666666666667, 0.98751999999999995, 0.9890133333333333, 0.98869333333333331, 0.98426666666666662, 0.98560000000000003, 0.99093333333333333, 0.99157333333333331, 0.99231999999999998, 0.99658666666666662, 0.99994666666666665, 0.99994666666666665, 0.99994666666666665, 0.99994666666666665, 0.9998933333333333, 0.9998933333333333, 0.99994666666666665, 0.99994666666666665, 1.0, 1.0, 0.99994666666666665, 1.0, 1.0, 1.0, 0.99994666666666665, 0.9998933333333333, 0.9998933333333333, 0.99994666666666665, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 0.9998933333333333, 0.9998933333333333, 0.99994666666666665, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0], 'loss': [0.66096524510065713, 0.60251230394999189, 0.55755540348688759, 0.50417322521845498, 0.4553801802190145, 0.39423027318954468, 0.33696667938232422, 0.25310164899667104, 0.1843972886300087, 0.13577249122460683, 0.090821224315563831, 0.082960747853914898, 0.077625990978876749, 0.071701066735585531, 0.066505232951641083, 0.050246429081757867, 0.047454721429347993, 0.043911529026230176, 0.053869656380017596, 0.049129247435728711, 0.037948016947607202, 0.037407833847204842, 0.032645335459013783, 0.020367217614551385, 0.0098970298432310422, 0.0079641506666441753, 0.007760948695490758, 0.0073177562509973842, 0.0066278330479065577, 0.0062338190081715587, 0.005831012386331956, 0.0055164803894360856, 0.0050136769266426566, 0.0049698377213627104, 0.0045335783093422653, 0.0043223557150860624, 0.0040322599734862645, 0.0042169533460587267, 0.0040594824566692117, 0.0038770630473643542, 0.003800476775839925, 0.0036546519884467126, 0.0034199453267703453, 0.0031003407175590595, 0.0032379238306855162, 0.0032608512243628503, 0.0030321109636376299, 0.0030461734936883052, 0.0029766344864914814, 0.0029135984853655098, 0.0026570867832005022, 0.0025076298517609638, 0.0026299074064319332, 0.002490029305741191, 0.0024280058349917333, 0.0023558908302088581, 0.0021960328992456199, 0.0023255339737112322, 0.0023219326059271891, 0.0020706570873906217], 'batch': [292, 292, 292, 292, 292, 292, 292, 292, 292, 292, 292, 292, 292, 292, 292, 292, 292, 292, 292, 292, 292, 292, 292, 292, 292, 292, 292, 292, 292, 292, 292, 292, 292, 292, 292, 292, 292, 292, 292, 292, 292, 292, 292, 292, 292, 292, 292, 292, 292, 292, 292, 292, 292, 292, 292, 292, 292, 292, 292, 292], 'val_acc': [0.58272000000000002, 0.68415999999999999, 0.70416000000000001, 0.73407999999999995, 0.59584000000000004, 0.76463999999999999, 0.78591999999999995, 0.67247999999999997, 0.81103999999999998, 0.74624000000000001, 0.80896000000000001, 0.79296, 0.72448000000000001, 0.76751999999999998, 0.78576000000000001, 0.79679999999999995, 0.80528, 0.79615999999999998, 0.78544000000000003, 0.79024000000000005, 0.79727999999999999, 0.78351999999999999, 0.79696, 0.81184000000000001, 0.81423999999999996, 0.81391999999999998, 0.81408000000000003, 0.81455999999999995, 0.81376000000000004, 0.81503999999999999, 0.81344000000000005, 0.81440000000000001, 0.81408000000000003, 0.81408000000000003, 0.81103999999999998, 0.81135999999999997, 0.81264000000000003, 0.81535999999999997, 0.81055999999999995, 0.81311999999999995, 0.81167999999999996, 0.81184000000000001, 0.81232000000000004, 0.81103999999999998, 0.81200000000000006, 0.81247999999999998, 0.81167999999999996, 0.81167999999999996, 0.81120000000000003, 0.81103999999999998, 0.81184000000000001, 0.81167999999999996, 0.81215999999999999, 0.81152000000000002, 0.81200000000000006, 0.81088000000000005, 0.81055999999999995, 0.81072, 0.81103999999999998, 0.81311999999999995], 'val_loss': [0.66323673450469967, 0.5854979243087769, 0.55960757585525511, 0.54635018127441404, 0.93855842555999758, 0.53104276062011724, 0.48182720432281495, 0.96671885446548467, 0.46510607001304627, 0.73187205430984492, 0.50358315374374385, 0.57243882286071779, 1.0303087930679322, 0.78865345264434816, 0.57424940204143526, 0.63237994078636173, 0.62346292119979863, 0.64191558809280391, 0.70791081592559812, 0.78111661178588865, 0.64544504346847531, 0.71805332042694092, 0.6913547252655029, 0.6689467629051209, 0.67256693210601803, 0.67230848577499391, 0.68701177753448484, 0.67543874372482304, 0.69979702983856196, 0.70509329910278318, 0.70809677968978879, 0.73088359319686891, 0.7167953396987915, 0.72915623466491697, 0.74287793304443361, 0.73951993263244631, 0.74755212207794186, 0.7542802974319458, 0.76091298088073733, 0.75528446842193608, 0.76680799823760981, 0.76910124156951909, 0.77137601329803462, 0.78814651325225826, 0.79396389606475826, 0.78126737098693844, 0.79712862529754636, 0.79072718971252443, 0.79756058330535884, 0.79091342765808104, 0.80556001319885251, 0.81648752490997312, 0.8161456254577637, 0.79706697704315188, 0.81621215755462651, 0.82276443237304686, 0.8298242942810059, 0.84755123180389402, 0.83619567523956295, 0.81817739814758306], 'size': [31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31]}
hist ={'acc': [0.61951999999999996, 0.77170666666666665, 0.83760000000000001, 0.86528000000000005, 0.88613333333333333, 0.89874666666666669, 0.90709333333333331, 0.91602666666666666, 0.92482666666666669, 0.92698666666666663, 0.93288000000000004, 0.93922666666666665, 0.94135999999999997, 0.94802666666666668, 0.94869333333333339, 0.95133333333333336, 0.95525333333333329, 0.95743999999999996, 0.95960000000000001, 0.96135999999999999, 0.96306666666666663, 0.96509333333333336, 0.96543999999999996, 0.97045333333333328, 0.97186666666666666], 'loss': [0.63844141895294193, 0.47848376563707989, 0.36781092189153036, 0.31195125549952191, 0.27345538512547812, 0.24447771657943726, 0.223868361714681, 0.20573332547187806, 0.18833642890135446, 0.17918039000511168, 0.16939229509512582, 0.15453991984923682, 0.14843729253053664, 0.13444095009485882, 0.13151166947762172, 0.12288821726799011, 0.11764726775487264, 0.1118359219566981, 0.10408324633876483, 0.10383469001789888, 0.095940436923901237, 0.094547189220984776, 0.090859603000481917, 0.081742304106553393, 0.075947360633611682], 'batch': [585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585], 'val_acc': [0.62343999999999999, 0.82647999999999999, 0.86951999999999996, 0.89295999999999998, 0.89936000000000005, 0.90127999999999997, 0.91903999999999997, 0.90471999999999997, 0.92471999999999999, 0.91991999999999996, 0.93191999999999997, 0.92871999999999999, 0.93552000000000002, 0.93896000000000002, 0.93328, 0.93535999999999997, 0.93600000000000005, 0.92944000000000004, 0.92935999999999996, 0.93584000000000001, 0.94040000000000001, 0.94023999999999996, 0.94376000000000004, 0.94208000000000003, 0.94328000000000001], 'val_loss': [0.64920384429931643, 0.39348448449134826, 0.33252282171249392, 0.27575752491950989, 0.25996453018188476, 0.24484089900016784, 0.21952514928817748, 0.22738555394649507, 0.19011760674476624, 0.19792678730964661, 0.16936864914894104, 0.17935732094287873, 0.16077562838077544, 0.16285966594219209, 0.17462326645851134, 0.16419303091764451, 0.16285175944805144, 0.1837169475889206, 0.1762955101251602, 0.16733106744289397, 0.16371256225824357, 0.15570383219003678, 0.14981777836799623, 0.15030898282051086, 0.15404446303367614], 'size': [31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31]}
train_loss = hist['loss']
valid_loss = hist['val_loss']
x = np.arange(1, len(train_loss) + 1, 1)
import matplotlib.pyplot as plt
# plt.subplot(223)
plt.title("train validation loss on each epoch")
plt.xlabel("epoch")
plt.ylabel("loss")
plt.plot(train_loss,'g^',label = "train_loss")
plt.plot(valid_loss,'r--', label="valid_loss")
# Create a legend for the first line.
plt.legend(loc = 'lower center',shadow = True)

# Add the legend manually to the current Axes.

# Create another legend for the second line.
file = "ca_04_18_09_loss.jpg"
plt.savefig(file)
plt.close()

e3a08b4ec3bcce9b9a6ea91f31b93639790b1207
<mask token>

<mask token>
plt.title('train validation loss on each epoch')
plt.xlabel('epoch')
plt.ylabel('loss')
plt.plot(train_loss, 'g^', label='train_loss')
plt.plot(valid_loss, 'r--', label='valid_loss')
plt.legend(loc='lower center', shadow=True)
<mask token>
plt.savefig(file)
plt.close()

<mask token>
hist = {'acc': [0.61952, 0.7717066666666667, 0.8376, 0.86528, 
    0.8861333333333333, 0.8987466666666667, 0.9070933333333333, 
    0.9160266666666667, 0.9248266666666667, 0.9269866666666666, 0.93288, 
    0.9392266666666667, 0.94136, 0.9480266666666667, 0.9486933333333334, 
    0.9513333333333334, 0.9552533333333333, 0.95744, 0.9596, 0.96136, 
    0.9630666666666666, 0.9650933333333334, 0.96544, 0.9704533333333333, 
    0.9718666666666667], 'loss': [0.6384414189529419, 0.4784837656370799, 
    0.36781092189153036, 0.3119512554995219, 0.2734553851254781, 
    0.24447771657943726, 0.223868361714681, 0.20573332547187806, 
    0.18833642890135446, 0.17918039000511168, 0.16939229509512582, 
    0.15453991984923682, 0.14843729253053664, 0.13444095009485882, 
    0.13151166947762172, 0.12288821726799011, 0.11764726775487264, 
    0.1118359219566981, 0.10408324633876483, 0.10383469001789888, 
    0.09594043692390124, 0.09454718922098478, 0.09085960300048192, 
    0.08174230410655339, 0.07594736063361168], 'batch': [585, 585, 585, 585,
    585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 
    585, 585, 585, 585, 585, 585, 585], 'val_acc': [0.62344, 0.82648, 
    0.86952, 0.89296, 0.89936, 0.90128, 0.91904, 0.90472, 0.92472, 0.91992,
    0.93192, 0.92872, 0.93552, 0.93896, 0.93328, 0.93536, 0.936, 0.92944, 
    0.92936, 0.93584, 0.9404, 0.94024, 0.94376, 0.94208, 0.94328],
    'val_loss': [0.6492038442993164, 0.39348448449134826, 
    0.3325228217124939, 0.2757575249195099, 0.25996453018188476, 
    0.24484089900016784, 0.21952514928817748, 0.22738555394649507, 
    0.19011760674476624, 0.1979267873096466, 0.16936864914894104, 
    0.17935732094287873, 0.16077562838077544, 0.1628596659421921, 
    0.17462326645851134, 0.1641930309176445, 0.16285175944805144, 
    0.1837169475889206, 0.1762955101251602, 0.16733106744289397, 
    0.16371256225824357, 0.15570383219003678, 0.14981777836799623, 
    0.15030898282051086, 0.15404446303367614], 'size': [31, 31, 31, 31, 31,
    31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31,
    31, 31]}
train_loss = hist['loss']
valid_loss = hist['val_loss']
x = np.arange(1, len(train_loss) + 1, 1)
<mask token>
plt.title('train validation loss on each epoch')
plt.xlabel('epoch')
plt.ylabel('loss')
plt.plot(train_loss, 'g^', label='train_loss')
plt.plot(valid_loss, 'r--', label='valid_loss')
plt.legend(loc='lower center', shadow=True)
file = 'ca_04_18_09_loss.jpg'
plt.savefig(file)
plt.close()

import numpy as np
hist = {'acc': [0.61952, 0.7717066666666667, 0.8376, 0.86528, 
    0.8861333333333333, 0.8987466666666667, 0.9070933333333333, 
    0.9160266666666667, 0.9248266666666667, 0.9269866666666666, 0.93288, 
    0.9392266666666667, 0.94136, 0.9480266666666667, 0.9486933333333334, 
    0.9513333333333334, 0.9552533333333333, 0.95744, 0.9596, 0.96136, 
    0.9630666666666666, 0.9650933333333334, 0.96544, 0.9704533333333333, 
    0.9718666666666667], 'loss': [0.6384414189529419, 0.4784837656370799, 
    0.36781092189153036, 0.3119512554995219, 0.2734553851254781, 
    0.24447771657943726, 0.223868361714681, 0.20573332547187806, 
    0.18833642890135446, 0.17918039000511168, 0.16939229509512582, 
    0.15453991984923682, 0.14843729253053664, 0.13444095009485882, 
    0.13151166947762172, 0.12288821726799011, 0.11764726775487264, 
    0.1118359219566981, 0.10408324633876483, 0.10383469001789888, 
    0.09594043692390124, 0.09454718922098478, 0.09085960300048192, 
    0.08174230410655339, 0.07594736063361168], 'batch': [585, 585, 585, 585,
    585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 
    585, 585, 585, 585, 585, 585, 585], 'val_acc': [0.62344, 0.82648, 
    0.86952, 0.89296, 0.89936, 0.90128, 0.91904, 0.90472, 0.92472, 0.91992,
    0.93192, 0.92872, 0.93552, 0.93896, 0.93328, 0.93536, 0.936, 0.92944, 
    0.92936, 0.93584, 0.9404, 0.94024, 0.94376, 0.94208, 0.94328],
    'val_loss': [0.6492038442993164, 0.39348448449134826, 
    0.3325228217124939, 0.2757575249195099, 0.25996453018188476, 
    0.24484089900016784, 0.21952514928817748, 0.22738555394649507, 
    0.19011760674476624, 0.1979267873096466, 0.16936864914894104, 
    0.17935732094287873, 0.16077562838077544, 0.1628596659421921, 
    0.17462326645851134, 0.1641930309176445, 0.16285175944805144, 
    0.1837169475889206, 0.1762955101251602, 0.16733106744289397, 
    0.16371256225824357, 0.15570383219003678, 0.14981777836799623, 
    0.15030898282051086, 0.15404446303367614], 'size': [31, 31, 31, 31, 31,
    31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31,
    31, 31]}
train_loss = hist['loss']
valid_loss = hist['val_loss']
x = np.arange(1, len(train_loss) + 1, 1)
import matplotlib.pyplot as plt
plt.title('train validation loss on each epoch')
plt.xlabel('epoch')
plt.ylabel('loss')
plt.plot(train_loss, 'g^', label='train_loss')
plt.plot(valid_loss, 'r--', label='valid_loss')
plt.legend(loc='lower center', shadow=True)
file = 'ca_04_18_09_loss.jpg'
plt.savefig(file)
plt.close()

import numpy as np
# hist = {'acc': [0.60170666666666661, 0.64970666666666665, 0.67247999999999997, 0.70096000000000003, 0.72831999999999997, 0.75327999999999995, 0.79210666666666663, 0.83685333333333334, 0.89738666666666667, 0.94869333333333339, 0.98768, 0.99856, 0.99978666666666671, 0.9998933333333333, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0], 'loss': [0.67599039871851607, 0.64008198080062861, 0.61161179876963301, 0.58364227013905845, 0.55147493773142497, 0.51707415517807009, 0.46878006409645079, 0.40509848320325215, 0.31960229801177981, 0.23928055049419403, 0.1614533010260264, 0.10840653987010319, 0.078473922821680711, 0.061212156519095104, 0.050844819813569385, 0.043658380607366563, 0.038931761085589725, 0.034905506468613942, 0.031930986449718472, 0.029555683100223541], 'batch': [72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72], 'val_acc': [0.50319999999999998, 0.66639999999999999, 0.60928000000000004, 0.53503999999999996, 0.51727999999999996, 0.66991999999999996, 0.59023999999999999, 0.73343999999999998, 0.72575999999999996, 0.63888, 0.68000000000000005, 0.75280000000000002, 0.73392000000000002, 0.76048000000000004, 0.73775999999999997, 0.76719999999999999, 0.76271999999999995, 0.76256000000000002, 0.76383999999999996, 0.76304000000000005], 'val_loss': [0.75814045246124273, 0.62419310464859012, 0.65664560201644895, 0.93560365699768067, 1.0031634732627868, 0.62035980564117432, 0.77652886445999147, 0.54206495063781734, 0.54205195611953738, 0.72585166383743283, 0.67904411331176762, 0.51066716083526609, 0.56879334230422973, 0.50325737421035766, 0.565705334186554, 0.50501513553619382, 0.51068809757232669, 0.51375373683929448, 0.51847371002197262, 0.52685898157119748], 'size': [127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127]}
# hist = {'acc': [0.61040000000000005, 0.66965333333333332, 0.71269333333333329, 0.74261333333333335, 0.76970666666666665, 0.78549333333333338, 0.80197333333333332, 0.81872, 0.84133333333333338, 0.86138666666666663, 0.88234666666666661, 0.91221333333333332, 0.93493333333333328, 0.95573333333333332, 0.97338666666666662, 0.98154666666666668, 0.98912, 0.99407999999999996, 0.99754666666666669, 0.99914666666666663], 'loss': [0.66229341925303142, 0.61037688517888389, 0.56105807796478269, 0.5257215232054393, 0.48902832611719765, 0.46184740505854288, 0.42996074739456175, 0.40144161385854088, 0.35829173561731975, 0.32654467482248944, 0.28088018836657208, 0.23035042788187662, 0.18728675130685171, 0.14588080277283985, 0.10805082000096639, 0.083060047481854762, 0.063971798425515494, 0.048059171452919644, 0.034843711685736974, 0.024511216193437577], 'batch': [292, 292, 292, 292, 292, 292, 292, 292, 292, 292, 292, 292, 292, 292, 292, 292, 292, 292, 292, 292], 'val_acc': [0.50495999999999996, 0.65007999999999999, 0.66703999999999997, 0.73760000000000003, 0.74831999999999999, 0.7792, 0.74319999999999997, 0.74480000000000002, 0.76768000000000003, 0.77983999999999998, 0.75600000000000001, 0.76127999999999996, 0.76207999999999998, 0.75551999999999997, 0.76959999999999995, 0.77327999999999997, 0.75744, 0.74095999999999995, 0.76207999999999998, 0.76432], 'val_loss': [0.85289827960968012, 0.61938058338165281, 0.60033894657135012, 0.53840571493148803, 0.51515883089065551, 0.47567841200828553, 0.54509489851951598, 0.55246049943923947, 0.49265963602066037, 0.48533072179794312, 0.55839545064926144, 0.55713994558334345, 0.59176110905647283, 0.61099106838226314, 0.57528177835464478, 0.58856903702735897, 0.65395764139175416, 0.77298401973724362, 0.68928052658081052, 0.65886097120285037], 'size': [31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31]}
# hist = {'acc': [0.60842666666666667, 0.66496, 0.70799999999999996, 0.74319999999999997, 0.76719999999999999, 0.78591999999999995, 0.80047999999999997, 0.81999999999999995, 0.83813333333333329, 0.86160000000000003, 0.88549333333333335, 0.91013333333333335, 0.92858666666666667, 0.9496, 0.96981333333333331, 0.98197333333333336, 0.98794666666666664, 0.99456, 0.99695999999999996, 0.99754666666666669, 0.99925333333333333, 0.99936000000000003, 0.9998933333333333, 0.9998933333333333, 0.99983999999999995, 0.99994666666666665, 0.99983999999999995, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0], 'loss': [0.66240078449249262, 0.61301115545908613, 0.56650861356099447, 0.52666178926467899, 0.49086858425140378, 0.46030765804608664, 0.43432388045310977, 0.39819696858406067, 0.36649336884180705, 0.33039594181378684, 0.28322263444264728, 0.23331937576611836, 0.19571519700368245, 0.15482046542803446, 0.11591709202289581, 0.086087764985958729, 0.067531267909208936, 0.049765399232705433, 0.035450270514289541, 0.029474592960675557, 0.022904746125936508, 0.018450904572010041, 0.014534764552215735, 0.0134843383474648, 0.012718115153312682, 0.010768842419087887, 0.010740207039515177, 0.0085216235853234935, 0.0075080361364781856, 0.0067496916103363036, 0.0065559151982019347, 0.0055863112429281074, 0.0056592495764295264, 0.0055201838895678522, 0.0049493034219990177, 0.0045409350671619178, 0.0042915554307897882, 0.0041260089698682226, 0.0045062989238649608, 0.0040759931686023872, 0.0041205350280801457, 0.0039253659020860986, 0.003558775956208507, 0.0033647228382527828, 0.0031103958547860386, 0.0031776673414558171, 0.0030192559991901119, 0.0029129640011489391, 0.0028474370118354757, 0.003024212182847162, 0.002913796332279841, 0.002834449345084528, 0.0029427745144069194, 0.002641335375420749, 0.0023857027138769627, 0.0023533324800928432, 0.0023200609461218121, 0.0023001326639950277, 0.0023025003504008055, 0.0023820328418289621], 'batch': [292, 292, 292, 292, 292, 292, 292, 292, 292, 292, 292, 292, 292, 292, 292, 292, 292, 292, 292, 292, 292, 292, 292, 292, 292, 292, 292, 292, 292, 292, 292, 292, 292, 292, 292, 292, 292, 292, 292, 292, 292, 292, 292, 292, 292, 292, 292, 292, 292, 292, 292, 292, 292, 292, 292, 292, 292, 292, 292, 292], 'val_acc': [0.50848000000000004, 0.65456000000000003, 0.65744000000000002, 0.69023999999999996, 0.77215999999999996, 0.76832, 0.60399999999999998, 0.75519999999999998, 0.748, 0.52976000000000001, 0.72255999999999998, 0.73760000000000003, 0.76863999999999999, 0.74080000000000001, 0.76848000000000005, 0.75792000000000004, 0.76336000000000004, 0.74944, 0.75439999999999996, 0.74272000000000005, 0.70399999999999996, 0.75407999999999997, 0.75488, 0.75360000000000005, 0.75504000000000004, 0.76127999999999996, 0.76559999999999995, 0.75775999999999999, 0.75824000000000003, 0.75631999999999999, 0.75744, 0.75248000000000004, 0.75712000000000002, 0.75695999999999997, 0.75407999999999997, 0.75583999999999996, 0.75536000000000003, 0.74992000000000003, 0.75712000000000002, 0.75600000000000001, 0.75712000000000002, 0.75807999999999998, 0.75375999999999999, 0.75375999999999999, 0.75471999999999995, 0.75439999999999996, 0.75183999999999995, 0.75583999999999996, 0.75536000000000003, 0.75375999999999999, 0.75407999999999997, 0.75392000000000003, 0.75471999999999995, 0.75631999999999999, 0.75439999999999996, 0.75407999999999997, 0.75471999999999995, 0.75360000000000005, 0.75456000000000001, 0.75392000000000003], 'val_loss': [0.83099874757766723, 0.61630004909515379, 0.60988262300491336, 0.58187653435707087, 0.48209546091079714, 0.49152652966499327, 0.95987617481231691, 0.51031813723564146, 0.55518745296478267, 1.6223285962677001, 0.63996526561737066, 0.62960652519226079, 0.58113950263977054, 0.66655004633903503, 0.63060753737449649, 0.63062375366687773, 0.69096670564651486, 0.72070998303890232, 0.72822552292346954, 0.75697966092109681, 1.0030097365951538, 0.71427239350318905, 0.77823157302856449, 0.77560362388610837, 0.76769009612560268, 0.7689899741268158, 0.77246122301578524, 0.79130663941383361, 0.80737354588985444, 0.79964950931549073, 0.79939541961431504, 0.83889609127044673, 0.8254445036077499, 0.826949597966671, 0.83998052089214326, 0.83905673991203311, 0.83934639024734492, 0.88232042727947235, 0.85239349826812749, 0.85866071177005765, 0.88359404543876652, 0.86687393261194234, 0.87489767303705213, 0.8848082482099533, 0.87654798297405245, 0.88409748976230618, 0.89592284898519514, 0.89214193494558336, 0.88900369663000112, 0.89869544796228407, 0.89222350886344914, 0.90436567729473116, 0.91327436664104467, 0.91660713975667951, 0.90649745750188826, 0.9294387438964844, 0.91614944346904759, 0.91154556308746337, 0.92372855185031888, 0.91708505530834195], 'size': [31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31]}
# hist = {'acc': [0.60405333333333333, 0.67749333333333328, 0.71808000000000005, 0.75626666666666664, 0.78778666666666664, 0.82389333333333337, 0.85962666666666665, 0.90400000000000003, 0.93973333333333331, 0.95855999999999997, 0.97861333333333334, 0.97824, 0.98010666666666668, 0.9809066666666667, 0.98186666666666667, 0.98751999999999995, 0.9890133333333333, 0.98869333333333331, 0.98426666666666662, 0.98560000000000003, 0.99093333333333333, 0.99157333333333331, 0.99231999999999998, 0.99658666666666662, 0.99994666666666665, 0.99994666666666665, 0.99994666666666665, 0.99994666666666665, 0.9998933333333333, 0.9998933333333333, 0.99994666666666665, 0.99994666666666665, 1.0, 1.0, 0.99994666666666665, 1.0, 1.0, 1.0, 0.99994666666666665, 0.9998933333333333, 0.9998933333333333, 0.99994666666666665, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 0.9998933333333333, 0.9998933333333333, 0.99994666666666665, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0], 'loss': [0.66096524510065713, 0.60251230394999189, 0.55755540348688759, 0.50417322521845498, 0.4553801802190145, 0.39423027318954468, 0.33696667938232422, 0.25310164899667104, 0.1843972886300087, 0.13577249122460683, 0.090821224315563831, 0.082960747853914898, 0.077625990978876749, 0.071701066735585531, 0.066505232951641083, 0.050246429081757867, 0.047454721429347993, 0.043911529026230176, 0.053869656380017596, 0.049129247435728711, 0.037948016947607202, 0.037407833847204842, 0.032645335459013783, 0.020367217614551385, 0.0098970298432310422, 0.0079641506666441753, 0.007760948695490758, 0.0073177562509973842, 0.0066278330479065577, 0.0062338190081715587, 0.005831012386331956, 0.0055164803894360856, 0.0050136769266426566, 0.0049698377213627104, 0.0045335783093422653, 0.0043223557150860624, 0.0040322599734862645, 0.0042169533460587267, 0.0040594824566692117, 0.0038770630473643542, 0.003800476775839925, 0.0036546519884467126, 0.0034199453267703453, 0.0031003407175590595, 0.0032379238306855162, 0.0032608512243628503, 0.0030321109636376299, 0.0030461734936883052, 0.0029766344864914814, 0.0029135984853655098, 0.0026570867832005022, 0.0025076298517609638, 0.0026299074064319332, 0.002490029305741191, 0.0024280058349917333, 0.0023558908302088581, 0.0021960328992456199, 0.0023255339737112322, 0.0023219326059271891, 0.0020706570873906217], 'batch': [292, 292, 292, 292, 292, 292, 292, 292, 292, 292, 292, 292, 292, 292, 292, 292, 292, 292, 292, 292, 292, 292, 292, 292, 292, 292, 292, 292, 292, 292, 292, 292, 292, 292, 292, 292, 292, 292, 292, 292, 292, 292, 292, 292, 292, 292, 292, 292, 292, 292, 292, 292, 292, 292, 292, 292, 292, 292, 292, 292], 'val_acc': [0.58272000000000002, 0.68415999999999999, 0.70416000000000001, 0.73407999999999995, 0.59584000000000004, 0.76463999999999999, 0.78591999999999995, 0.67247999999999997, 0.81103999999999998, 0.74624000000000001, 0.80896000000000001, 0.79296, 0.72448000000000001, 0.76751999999999998, 0.78576000000000001, 0.79679999999999995, 0.80528, 0.79615999999999998, 0.78544000000000003, 0.79024000000000005, 0.79727999999999999, 0.78351999999999999, 0.79696, 0.81184000000000001, 0.81423999999999996, 0.81391999999999998, 0.81408000000000003, 0.81455999999999995, 0.81376000000000004, 0.81503999999999999, 0.81344000000000005, 0.81440000000000001, 0.81408000000000003, 0.81408000000000003, 0.81103999999999998, 0.81135999999999997, 0.81264000000000003, 0.81535999999999997, 0.81055999999999995, 0.81311999999999995, 0.81167999999999996, 0.81184000000000001, 0.81232000000000004, 0.81103999999999998, 0.81200000000000006, 0.81247999999999998, 0.81167999999999996, 0.81167999999999996, 0.81120000000000003, 0.81103999999999998, 0.81184000000000001, 0.81167999999999996, 0.81215999999999999, 0.81152000000000002, 0.81200000000000006, 0.81088000000000005, 0.81055999999999995, 0.81072, 0.81103999999999998, 0.81311999999999995], 'val_loss': [0.66323673450469967, 0.5854979243087769, 0.55960757585525511, 0.54635018127441404, 0.93855842555999758, 0.53104276062011724, 0.48182720432281495, 0.96671885446548467, 0.46510607001304627, 0.73187205430984492, 0.50358315374374385, 0.57243882286071779, 1.0303087930679322, 0.78865345264434816, 0.57424940204143526, 0.63237994078636173, 0.62346292119979863, 0.64191558809280391, 0.70791081592559812, 0.78111661178588865, 0.64544504346847531, 0.71805332042694092, 0.6913547252655029, 0.6689467629051209, 0.67256693210601803, 0.67230848577499391, 0.68701177753448484, 0.67543874372482304, 0.69979702983856196, 0.70509329910278318, 0.70809677968978879, 0.73088359319686891, 0.7167953396987915, 0.72915623466491697, 0.74287793304443361, 0.73951993263244631, 0.74755212207794186, 0.7542802974319458, 0.76091298088073733, 0.75528446842193608, 0.76680799823760981, 0.76910124156951909, 0.77137601329803462, 0.78814651325225826, 0.79396389606475826, 0.78126737098693844, 0.79712862529754636, 0.79072718971252443, 0.79756058330535884, 0.79091342765808104, 0.80556001319885251, 0.81648752490997312, 0.8161456254577637, 0.79706697704315188, 0.81621215755462651, 0.82276443237304686, 0.8298242942810059, 0.84755123180389402, 0.83619567523956295, 0.81817739814758306], 'size': [31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31]}
hist ={'acc': [0.61951999999999996, 0.77170666666666665, 0.83760000000000001, 0.86528000000000005, 0.88613333333333333, 0.89874666666666669, 0.90709333333333331, 0.91602666666666666, 0.92482666666666669, 0.92698666666666663, 0.93288000000000004, 0.93922666666666665, 0.94135999999999997, 0.94802666666666668, 0.94869333333333339, 0.95133333333333336, 0.95525333333333329, 0.95743999999999996, 0.95960000000000001, 0.96135999999999999, 0.96306666666666663, 0.96509333333333336, 0.96543999999999996, 0.97045333333333328, 0.97186666666666666], 'loss': [0.63844141895294193, 0.47848376563707989, 0.36781092189153036, 0.31195125549952191, 0.27345538512547812, 0.24447771657943726, 0.223868361714681, 0.20573332547187806, 0.18833642890135446, 0.17918039000511168, 0.16939229509512582, 0.15453991984923682, 0.14843729253053664, 0.13444095009485882, 0.13151166947762172, 0.12288821726799011, 0.11764726775487264, 0.1118359219566981, 0.10408324633876483, 0.10383469001789888, 0.095940436923901237, 0.094547189220984776, 0.090859603000481917, 0.081742304106553393, 0.075947360633611682], 'batch': [585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585], 'val_acc': [0.62343999999999999, 0.82647999999999999, 0.86951999999999996, 0.89295999999999998, 0.89936000000000005, 0.90127999999999997, 0.91903999999999997, 0.90471999999999997, 0.92471999999999999, 0.91991999999999996, 0.93191999999999997, 0.92871999999999999, 0.93552000000000002, 0.93896000000000002, 0.93328, 0.93535999999999997, 0.93600000000000005, 0.92944000000000004, 0.92935999999999996, 0.93584000000000001, 0.94040000000000001, 0.94023999999999996, 0.94376000000000004, 0.94208000000000003, 0.94328000000000001], 'val_loss': [0.64920384429931643, 0.39348448449134826, 0.33252282171249392, 0.27575752491950989, 0.25996453018188476, 0.24484089900016784, 0.21952514928817748, 0.22738555394649507, 0.19011760674476624, 0.19792678730964661, 0.16936864914894104, 0.17935732094287873, 0.16077562838077544, 0.16285966594219209, 0.17462326645851134, 0.16419303091764451, 0.16285175944805144, 0.1837169475889206, 0.1762955101251602, 0.16733106744289397, 0.16371256225824357, 0.15570383219003678, 0.14981777836799623, 0.15030898282051086, 0.15404446303367614], 'size': [31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31]}
train_loss = hist['loss']
valid_loss = hist['val_loss']
x = np.arange(1, len(train_loss) + 1, 1)
import matplotlib.pyplot as plt
# plt.subplot(223)
plt.title("train validation loss on each epoch")
plt.xlabel("epoch")
plt.ylabel("loss")
plt.plot(train_loss,'g^',label = "train_loss")
plt.plot(valid_loss,'r--', label="valid_loss")
# Create a legend for the first line.
plt.legend(loc = 'lower center',shadow = True)

# Add the legend manually to the current Axes.

# Create another legend for the second line.
file = "ca_04_18_09_loss.jpg"
plt.savefig(file)
plt.close()
