Registration of backend webgl failed for tensorflowjs - Stack ...
文章推薦指數: 80 %
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
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
延伸文章資訊
- 1WebGL2RenderingContext - Web APIs | MDN
To get an object of this interface, call getContext() on a <canvas> ... context can accept additi...
- 2tensorflowjs Could not get context for WebGL version 2 - 博客园
在案例运行中,出现Could not get context for WebGL version 2 import * as tf from '@tensorflow/tfjs';
- 3ljqh - Politik mit Herz – SPD Hille
TL;DR: A Windows user cannot run WebGL without a graphics card. ... Therefore, WebGL 1 code might...
- 4[Posenet] Inconsistent ”Could not get context for WebGL ...
... Inconsistent ”Could not get context for WebGL version 2” error message ... whether it's possi...
- 5Inconsistent ”Could not get context for WebGL version 2” error ...
Click the first Run button. Console log prints: Could not get context for WebGL version 2 Tensor ...