Registration of backend webgl failed for tensorflowjs - Stack ...

文章推薦指數: 80 %
投票人數:10人

I've hacked getContext so it always fails so tensorflow.js can't get a WebGL context. It prints the 2 warnings but it also runs just fine. 2022DeveloperSurveyisopen!Takesurvey. Home Public Questions Tags Users Companies Collectives ExploreCollectives Teams StackOverflowforTeams –Startcollaboratingandsharingorganizationalknowledge. CreateafreeTeam WhyTeams? Teams CreatefreeTeam Collectives™onStackOverflow Findcentralized,trustedcontentandcollaboratearoundthetechnologiesyouusemost. Learnmore Teams Q&Aforwork Connectandshareknowledgewithinasinglelocationthatisstructuredandeasytosearch. Learnmore Registrationofbackendwebglfailedfortensorflowjs AskQuestion Asked 3years,2monthsago Modified 1year,6monthsago Viewed 5ktimes 5 1 Assuggestedintensorflowjsgithub,Ipostthequestionhere.Iamgettingbelowerror,insimplestexamplepossiblewithtensorflow. Error: Code:Asimplehtmlsnippetwithjusttfjsloading. TestingTfjs

TestingTfjs

Browser:ChromeVersion72.0.3626.119 OS:Win10,GPU:GT740M,version397.44. Chromegpushowsays:(becauseIdisabledhwaccelerationtoavoidchromeblackingoutattimes) WebGL:Softwareonly,hardwareaccelerationunavailable, WebGL2:Softwareonly,hardwareaccelerationunavailable Ihavetriedsettingbackendexplicitlyascpubutitdidnothelp.Ihaveseenotherpostsingithubtalkingaboutthiserror,butinvain. google-chrometensorflowwebgl Share Improvethisquestion Follow editedMar4,2019at7:27 ParthibanRajendran askedMar3,2019at18:01 ParthibanRajendranParthibanRajendran 41011goldbadge77silverbadges1717bronzebadges 2 Note:ThatmessageisjustawarningAFAICT.TensorflowlogsitasawarningandfallsbacktoCPUmodesojustignorethemessage.Otherwisedoeswebglworkforyouingeneral?Thecodeyouposteddoesnotgenerateanerrorforme.Maybeyourdevicedoesn'tactuallysupportWebGL?WhatOS?WhatGPU?WhatDriverversion?Whatdoesabout:gpushowinChrome? – gman Mar4,2019at5:13 Hi,IdidconfirmwebglworksinmybrowserwhichIcheckedhere.Neverthelessherearemoredetails:OS:Win10,GPU:GT740M,version397.44.gpushowsays:WebGL:Softwareonly,hardwareaccelerationunavailable,WebGL2:Softwareonly,hardwareaccelerationunavailable.Ifwebglisnotworking,whyget.webgl.orgsaysitisworking?Thiswebsitealsoconfirmswebglworkinginmybrowser. – ParthibanRajendran Mar4,2019at7:26 Addacomment  |  2Answers 2 Sortedby: Resettodefault Highestscore(default) Datemodified(newestfirst) Datecreated(oldestfirst) 3 sorry,myenglishisnotgood. Sameasmycase. inmycase... "WebGLisnotsupportedonthisdevice"and "tf.setBackend('webgl')"returnfalse. Tensorflowrequirehardwareacceleration. openchrome://gpu,thencheckyour GraphicsFeatureStatus ProblemsDetected GraphicsFeatureStatusforHardwareGPU ProblemsDetectedforHardwareGPU ProblemsDetected. Gpucompositinghasbeendisabled,eitherviablocklist,about:flagsorthecommandline.Thebrowserwillfallbacktosoftwarecompositingandhardwareaccelerationwillbeunavailable. DisabledFeatures:gpu_compositing thengotochrome://flags/ search"Overridesoftwarerenderinglist">setenabled>restartbrowser thx. Share Improvethisanswer Follow editedNov20,2020at0:53 answeredNov19,2020at9:21 feb30thfeb30th 7955bronzebadges Addacomment  |  0 Sosinceyoupostedyourabout:gpuresultshowingthatyou'reonlygettingsoftwarerenderingonlyforWebGLthatsuggeststensorflow.jsispassinginthefailIfMajorPerformanceCaveatcontextcreationflagtoWebGLwhichwillalmostcertainlyfailundersoftwarerendering WecancheckbyoverridinggetContextandprintoutthecreationflags SorunningthatIseetheseresults { "alpha":false, "antialias":false, "premultipliedAlpha":false, "preserveDrawingBuffer":false, "depth":false, "stencil":false, "failIfMajorPerformanceCaveat":true<====------- } Sothat'swhyitprintsthatwarning. Thatsaidit'sjustawarning.tensorflow.jsstillruns.Notice(a)itsays2warnings,not2errors.(b)theyaredisplayedinyellow,notred. usingconsole.warnvsconsole.erroryoucanseethedifference tensorflow.jsrunsjustfineAFAICT.Here'sanexample.I'vehackedgetContextsoitalwaysfailssotensorflow.jscan'tgetaWebGLcontext.Itprintsthe2warningsbutitalsorunsjustfine.Scrolltothebottomofthemessagesandyou'llseeitrantheexampletensorflowcode'sresults. constd=tf.tensor2d([[1.0,2.0],[3.0,4.0]]); constd_squared=d.square(); d_squared.print(); Share Improvethisanswer Follow answeredMar4,2019at13:12 gmangman 91.9k2929goldbadges230230silverbadges347347bronzebadges 2 3 Explainingthedifferencebetweenwarningsanderrorsisnotthepurposeofthequestionandisnothelping.Ifyouhavethewarnings,theperformancesaresolowbecauseofthenon-acceleratedcomputationthatitmakesthemodelunusable. – b26 Apr8,2019at13:59 1 Itisthepointofthequestion.Thequestionerthoughttensorflowwasnotworking.Itwasworking.Thequestionershowedgpuacclerationisdisabledontheircomputeraswell.TheyevensaidtheyforcedittoCPUoinlyandagainthoughtitwasn'tworkingbutitwas. – gman Apr9,2019at22:20 Addacomment  |  YourAnswer ThanksforcontributingananswertoStackOverflow!Pleasebesuretoanswerthequestion.Providedetailsandshareyourresearch!Butavoid…Askingforhelp,clarification,orrespondingtootheranswers.Makingstatementsbasedonopinion;backthemupwithreferencesorpersonalexperience.Tolearnmore,seeourtipsonwritinggreatanswers. Draftsaved Draftdiscarded Signuporlogin SignupusingGoogle SignupusingFacebook SignupusingEmailandPassword Submit Postasaguest Name Email Required,butnevershown PostYourAnswer Discard Byclicking“PostYourAnswer”,youagreetoourtermsofservice,privacypolicyandcookiepolicy Nottheansweryou'relookingfor?Browseotherquestionstaggedgoogle-chrometensorflowwebgloraskyourownquestion. TheOverflowBlog Makeyouropen-sourceprojectpublicbeforeyou’reready(Ep.444) Thescienceofinterviewingdevelopers FeaturedonMeta AnnouncingthearrivalofValuedAssociate#1214:Dalmarus Improvementstositestatusandincidentcommunication RetiringOurCommunity-SpecificClosureReasonsforServerFaultandSuperUser Temporarilypausingthesitesatisfactionsurvey StagingGround:ReviewerMotivation,Scaling,andOpenQuestions Related 849 RemovinginputbackgroundcolourforChromeautocomplete? 1 AsimpleHTMLpagewithcontent,butgetblankpageinChrome6.0.472.53 1693 DisablingChromecacheforwebsitedevelopment 1 HowdoIAutoplay



請為這篇文章評分?