0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

tensorflow.jsAdvent Calendar 2018

Day 21

jsdoでtensorflow.js その13

Last updated at Posted at 2018-10-23

#概要

jsdoでtensorflow.jsやってみた。
keras風、高級APIを使わないで、coreとか言われるレベルでやってみた。
7segmentLED問題、やってみた。
ウェイトとバイアス取り出してみた。

#ウェイトとバイアス

-1.5259331464767456,0.3070094585418701,-0.15048274397850037,-0.39157044887542725,-0.4613385498523712,-0.8594125509262085,-0.4157862663269043,-0.8176251649856567,0.5511190295219421,-1.0796546936035156,0.12992355227470398,0.08824124932289124,-0.8421005010604858,1.808848261833191,0.8758611083030701,-0.5629703402519226,1.729451298713684,-2.2443957328796387,1.3614097833633423,-0.5858731865882874,-1.8853949308395386,0.8192523121833801,0.5889331698417664,0.2977627217769623,0.1700744926929474,-0.0283060222864151,0.7097780704498291,0.2158941775560379,1.8365118503570557,0.3812485933303833,-0.9491969347000122,-1.478653073310852,-0.7013290524482727,-0.2527233958244324,-0.9588315486907959,0.036985646933317184,-0.10819029062986374,0.28745290637016296,-0.20716997981071472,-0.4468490779399872,-0.9585701823234558,1.0351407527923584,0.8192897439002991,-0.43629080057144165,-0.01247220579534769,-0.8564698696136475,0.9713550209999084,0.06598133593797684,1.7857260704040527,-0.977922260761261,0.023850195109844208,-0.2591973841190338,-0.6849809288978577,0.2133643925189972,-0.7256982326507568,1.583678126335144,0.5844421982765198,0.3695771098136902,0.6222645044326782,-0.34281378984451294,1.7043074369430542,0.1985396146774292,-0.4895610511302948,1.3798491954803467,-2.5435540676116943,-0.26839137077331543,-0.019234560430049896,0.11278603971004486,-1.4629491567611694,-0.7329615950584412,0.608088493347168,-0.3310675024986267,0.9550091624259949,-1.352828860282898,0.0055557661689817905,-0.7572805881500244,-1.1410659551620483,0.09517601877450943,0.1358790248632431,0.23110391199588776,-0.44225049018859863,-1.2202081680297852,-1.364825963973999,0.12699931859970093,0.23531681299209595,0.9407104253768921,-1.2818944454193115,-0.8836226463317871,-0.24467569589614868,2.285867214202881,0.7029300928115845,-0.37932223081588745,1.250028371810913,-1.6710275411605835,-1.131971001625061,0.028362937271595,-0.5003037452697754,0.7205410003662109,-0.03204154595732689,-0.8718450665473938,-0.7214749455451965,1.5089590549468994,-2.2606637477874756,0.4488799571990967,0.4312434494495392,-0.9316590428352356,-0.23408560454845428,0.18532340228557587,-0.38817501068115234,0.10089465230703354,0.6883721947669983,-1.7761520147323608,0.1410091668367386,0.9742636680603027,0.14779208600521088,1.0305014848709106,0.9444136619567871,-0.938889741897583,-1.6804242134094238,1.8356765508651733,-0.8512085676193237,-0.07100678235292435,0.29931020736694336,0.5888535380363464,0.14472214877605438,-0.7976426482200623,-0.8501322865486145,1.2099043130874634,0.8949146866798401,1.4966429471969604,0.2099384367465973,0.06968468427658081,-0.6838346123695374,-0.6723088026046753,-0.33478569984436035,0.06358283758163452,-1.7835943698883057,-0.19014288485050201,0.528171956539154,0.3898903429508209,1.2485096454620361,0.6914477348327637,-0.6984943151473999,-1.0610122680664062,0.7566655874252319,0.4933851361274719,0.8142549395561218,1.6978371143341064,-0.5491030216217041,0.2874406576156616,-0.1889832466840744,-1.7150522470474243,-0.29114803671836853,-0.22475315630435944,-0.021433210000395775,-0.6698920726776123,-0.3045804500579834,-0.8910751938819885,0.31609851121902466,0.17607253789901733,0.4661942422389984,0.08092144876718521,0.0010259727714583278,0.588285505771637,-1.6814711093902588,-1.6643329858779907,-0.03195226192474365,0.1833343207836151,2.324803113937378,-0.19211359322071075,1.5626671314239502,0.5955355167388916,1.2310869693756104,-1.7136781215667725,-0.7593351006507874,-0.5999516248703003,-0.7784127593040466,-0.6808763742446899,-1.0329872369766235,0.7284212112426758,1.0323463678359985,0.9495477080345154,0.7470693588256836,-1.5185717344284058,-1.2224674224853516,-0.9549792408943176,0.8613333702087402,-0.3616887927055359,-0.5199914574623108,1.0578373670578003,-0.20754121243953705,1.6373023986816406,1.8191028833389282,0.6632324457168579,-0.6110894680023193,-1.1837652921676636,-0.3271198272705078,-0.4835241734981537,-0.592835545539856,-0.7610511779785156,-0.04157927632331848,-0.3701857328414917,-0.41471952199935913,-0.10929976403713226,-0.8990142941474915,-0.5707930326461792,-0.5686159133911133,0.7458888292312622,0.5480345487594604,0.1619137078523636,0.23681779205799103,0.15771204233169556,-0.9141851663589478,0.5987394452095032,-1.0022021532058716,-0.33828461170196533,0.4253847897052765,2.16129732131958,0.2036615014076233,0.5656459927558899,-0.901605486869812,-0.018593542277812958,0.27994200587272644,-0.15926028788089752,-0.3375391662120819,0.7167105078697205,-0.3149280548095703,0.9159647822380066,0.3823167681694031,0.8393445611000061,1.6881533861160278,-0.6667103171348572,-0.6619340777397156,-0.7505821585655212,1.9007002115249634,-0.4442957639694214,-1.5953987836837769,3.307331085205078,0.3549560308456421,0.06128032132983208,1.3193496465682983,0.5417963862419128,0.4103376567363739,-0.910615861415863,0.26123347878456116,0.061264246702194214,0.48434555530548096,-0.3893119990825653,1.1432551145553589,-1.16435706615448,1.0494529008865356,-0.4917874038219452,1.1506984233856201,0.6683918237686157,0.4369708299636841,0.4075014889240265,-0.04137140512466431,-1.6061571836471558,0.44672438502311707,0.5385826230049133,-0.026850024238228798,0.36661699414253235,0.03231928125023842,0.9530350565910339,0.8374318480491638,-0.7132806777954102,-0.012608843855559826,-1.205154299736023,0.014168479479849339,1.4407801628112793,0.22118477523326874,1.9599888324737549,1.1266487836837769,0.31492599844932556,-0.777249813079834,-1.5652029514312744,0.8833106756210327,-1.1962015628814697,0.8826953768730164,-0.1988058090209961,-0.6582549214363098,-0.32258686423301697,-0.4614056944847107,0.11057788133621216,1.0364700555801392,-0.24134142696857452,-1.7081962823867798,0.302383154630661,2.2840282917022705,1.9372638463974,-1.2370446920394897,0.4319818913936615,0.9172230362892151,0.7389340996742249,1.183626651763916,0.43481186032295227,0.40679073333740234,1.0910580158233643,-0.7148085832595825,1.2387568950653076,-0.5119324922561646,-0.06781178712844849,-0.850659966468811,-0.15334901213645935,-0.24259956181049347,0.28520914912223816,-0.4449753165245056,0.26197221875190735,-0.6914271712303162,-0.6084141731262207,-0.4481252431869507,0.16423439979553223,0.671238899230957,0.053797896951436996,-1.1373376846313477,-0.4673614203929901,1.2242841720581055,-0.2852059006690979,-1.0645476579666138,-0.0022391516249626875,-0.1331445723772049,0.2840966284275055,-0.5897669792175293,0.26373007893562317,-0.2188957929611206,-1.7656354904174805,-0.8087369203567505,-0.2583376467227936,-1.3698513507843018,0.15893113613128662,0.7907463908195496,0.6442309021949768,-1.0424519777297974,0.10364615172147751,0.2501976788043976,-0.5916982293128967,-0.47515901923179626,0.9478307962417603,-1.1253091096878052,-1.6563562154769897,1.2553178071975708,0.5265655517578125,-0.05125156044960022,0.7001633048057556,-0.4444204270839691,-1.25792396068573,-1.3994441032409668,-0.48885512351989746,0.33662500977516174,-1.135961651802063,-0.40100938081741333,-2.0240817070007324,1.5522339344024658,-1.4620788097381592,1.0212833881378174,0.05254202336072922,0.2242358773946762,-0.745051920413971,0.7530024647712708,-0.8515585660934448,-0.8878386616706848,0.5528936982154846,1.4128413200378418,0.09312698990106583,-1.4781253337860107,0.04702399671077728,0.3867247700691223,-0.27938055992126465,-2.992279529571533,0.29842397570610046,0.6620047688484192,0.6986772418022156,0.3289852440357208,-0.5447850227355957,0.8528979420661926,0.659628689289093,1.1787374019622803,1.7594194412231445,0.5005611181259155,1.5413633584976196,1.1932231187820435,-1.7360830307006836,0.053767457604408264,1.5256314277648926,1.1689388751983643,1.9586541652679443,-0.650249183177948,-0.27820196747779846,-0.8992292881011963,-1.6940492391586304,-0.655551552772522,0.10286612063646317,-1.0459212064743042,0.12052313983440399,-0.6848792433738708,-0.1400376409292221,0.4263017773628235,0.20241059362888336,-0.3612476587295532,0.47562503814697266
0.7760447263717651,0.6842058300971985,-0.5956039428710938,-0.06825491786003113,-0.6691970825195312,1.9269932508468628,-1.0225732326507568,0.39002588391304016,-2.2184576988220215,0.42065295577049255,2.1964597702026367,0.5424900650978088,-0.48305267095565796,0.33919551968574524,-1.108720302581787,-1.522336721420288,1.9581506252288818,-0.8959825038909912,1.3367403745651245,1.4257506132125854,-1.4616373777389526,-0.8364843726158142,0.20795710384845734,0.015390762127935886,0.2686379849910736,-0.10291324555873871,0.07074510306119919,0.6390458345413208,-0.1904727965593338,-0.2911496162414551,1.7949434518814087,-1.055877447128296,-0.22762155532836914,-0.1885564923286438,1.1727230548858643,-0.8782104253768921,2.7643117904663086,-0.656183123588562,-0.5197513103485107,0.11829233169555664
-0.30309343338012695,0.05929633975028992,0.7087998390197754,-1.4341685771942139,-1.6241779327392578,1.1079223155975342,0.3808467984199524,0.6663936972618103,0.4596148431301117,-1.304810881614685,-0.9742497801780701,0.08499941974878311,1.3364835977554321,0.12382921576499939,-1.1239454746246338,-1.9419527053833008,0.4985871911048889,-0.7954995036125183,0.0654364824295044,2.3992955684661865,0.06222272291779518,0.5847014784812927,-0.5829802751541138,-0.6621410846710205,-0.6893128752708435,0.20928627252578735,-0.345182865858078,-0.8779760599136353,1.5951462984085083,0.8838871121406555,-0.15801914036273956,-0.47269612550735474,-0.7685829997062683,-0.13274520635604858,0.110379658639431,0.7712411284446716,-0.3770882189273834,2.2107958793640137,-0.220300555229187,0.5317145586013794,-1.2297831773757935,-1.3514525890350342,0.03979489952325821,0.5029154419898987,1.9253580570220947,1.0039513111114502,0.919525146484375,-0.22412718832492828,0.632448136806488,-1.6209925413131714,0.8091261982917786,-0.9524906873703003,0.8724768757820129,-1.2039273977279663,0.8749988675117493,-0.6117457151412964,-0.10074814409017563,0.5262336730957031,-0.7759347558021545,0.9439682364463806,0.2594534456729889,2.7660975456237793,-1.066320538520813,-0.9901775121688843,-0.9266226291656494,-0.3809007704257965,0.8340451121330261,-0.31386440992355347,-0.4124227464199066,1.2587120532989502,0.15854789316654205,0.44213786721229553,0.49678656458854675,-0.9223683476448059,-0.6083530187606812,0.8697088360786438,-0.36858072876930237,0.7049535512924194,0.6398341059684753,-0.5724180936813354,-0.5167805552482605,0.7365713119506836,1.1224236488342285,0.22816917300224304,0.1187979057431221,0.043153900653123856,0.566922664642334,1.2892943620681763,0.18177059292793274,-1.8552806377410889,-0.6199305057525635,-0.9260422587394714,-1.0832656621932983,0.137424498796463,-1.1216105222702026,-0.000467289995867759,1.0085474252700806,0.7656988501548767,0.5876635313034058,-1.0987900495529175,0.20089329779148102,0.7110031247138977,-0.010879271663725376,-0.10848220437765121,1.4081566333770752,0.3383467197418213,1.0814262628555298,0.6881457567214966,-0.36677247285842896,0.5037441849708557,0.7797141671180725,2.001446008682251,-0.24806641042232513,-0.6454505324363708,0.3674074411392212,0.6529427170753479,-1.4468308687210083,0.5060343146324158,0.3171963095664978,0.6267260909080505,-1.2292505502700806,0.13632969558238983,-0.8700256943702698,0.0893518254160881,-0.41533130407333374,-0.3664718270301819,0.3597937822341919,-0.8590385913848877,0.1286923736333847,-0.5229372382164001,1.5772221088409424,0.09507659077644348,0.6482908129692078,0.6559383869171143,1.2394089698791504,0.32836371660232544,0.7104325890541077,0.03052068129181862,-0.13858994841575623,0.15955111384391785,0.877159833908081,-1.906809687614441,1.2644004821777344,0.9737951755523682,0.2558395266532898,-0.46099117398262024,0.3393712043762207,-0.37215903401374817,0.12058338522911072,0.28590452671051025,-0.39866963028907776,0.44202277064323425,0.6146838665008545,1.3688130378723145,0.613717794418335,1.3596972227096558,-0.6119151711463928,-0.7247928977012634,-0.2287711501121521,0.11950267851352692,-0.5890531539916992,-0.05997784808278084,0.7913751602172852,-2.1983721256256104,1.6101256608963013,-1.603988766670227,-0.9686902165412903,-0.1650594174861908,0.7671353220939636,-0.21486565470695496,0.5151647925376892,-0.8578105568885803,0.6878306865692139,1.3140605688095093,0.2504892647266388,0.3533079922199249,1.0832239389419556,-0.26571983098983765,-0.5744723677635193,-1.4372377395629883,-0.011041194200515747,-2.0517148971557617,1.4967012405395508,0.8896310925483704,0.5380568504333496,0.27727529406547546,-0.5616728067398071,-0.6672757267951965,0.169767826795578,1.927829623222351,-1.7494981288909912,0.010411441326141357,-0.457209974527359,-0.6966063380241394,-0.27774637937545776,1.0857561826705933,1.646140217781067,-0.23322075605392456,0.08126349747180939,1.0027637481689453,0.8975164294242859,0.9013334512710571,-0.6428412795066833,-0.6491862535476685,-1.968959093093872,-1.8968161344528198,0.44011759757995605,-1.2927424907684326,-0.552958607673645,-0.7793532609939575,0.8141721487045288,-1.0870016813278198,-0.5038922429084778,-0.5084787607192993,-0.14344334602355957,-1.1816121339797974,1.0375488996505737,1.4235992431640625,-0.6803892850875854,-0.4993314743041992,-0.05000687018036842,0.01694834977388382,0.10214567184448242,2.1302378177642822,2.5700504779815674,-0.3507392108440399,0.541797935962677,-1.4479024410247803,1.6843593120574951,0.8836954832077026,-1.3514407873153687,-1.152107834815979,-0.1626196652650833,-0.3246908485889435,-1.0934674739837646,1.0643185377120972,-0.9182097911834717,0.030702855437994003,0.532643735408783,0.9241651296615601,-0.9425974488258362,-0.6469494104385376,-0.06515265256166458,-2.6439781188964844,-0.4493095278739929,1.1392724514007568,2.4606292247772217,1.4671992063522339,-0.16883344948291779,-0.15941457450389862,-0.07454372942447662,-0.2025710940361023,0.5462660193443298,-1.638023018836975,0.9142993092536926,0.6942942142486572,0.4689280688762665,1.8583240509033203,-0.7503750920295715,-0.4995500147342682,-1.207425832748413,-0.3932909369468689,-1.5809762477874756,0.9849715828895569,-0.3834626078605652,-0.7068692445755005,-0.6650033593177795,-0.6119390726089478,-0.6113004088401794,0.21688438951969147,0.06941764056682587,-0.48028653860092163,-1.8150880336761475,2.0960474014282227,0.9649010896682739,-1.9473743438720703,-0.16481716930866241,1.1352859735488892,0.6022302508354187,-0.21130433678627014
-1.7047818899154663,1.2517160177230835,0.6092268228530884,1.3910387754440308,1.9010719060897827,-0.9909670352935791,0.8906705379486084

#成果物

以上。

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?