TesorFlow.js
TesorFlow.jsisaope-sourcehardware-acceleratedJavaScriptlibraryfortraiigaddeployigmachielearigmodels.
DevelopMLitheBrowserUseflexibleadituitiveAPIstobuildmodelsfromscratchusigthelow-levelJavaScriptliearalgebralibraryorthehigh-levellayersAPI.
DevelopMLiNode.jsExecuteativeTesorFlowwiththesameTesorFlow.jsAPIudertheNode.jsrutime.
RuExistigmodelsUseTesorFlow.jsmodelcoverterstorupre-existigTesorFlowmodelsrightithebrowser.
RetraiExistigmodelsRetraipre-existigMLmodelsusigsesordatacoectedtothebrowserorothercliet-sidedata.
AboutthisrepoThisrepositorycotaisthelogicadscriptsthatcombieseveralpackages.
APIs:
TesorFlow.jsCore,aflexiblelow-levelAPIforeuraletworksadumericalcomputatio.TesorFlow.jsLayers,ahigh-levelAPIwhichimplemetsfuctioalitysimilartoKeras.TesorFlow.jsData,asimpleAPItoloadadpreparedataaalogoustotf.data.TesorFlow.jsCoverter,toolstoimportaTesorFlowSavedModeltoTesorFlow.jsTesorFlow.jsVis,i-browservisualizatioforTesorFlow.jsmodelsTesorFlow.jsAutoML,SetofAPIstoloadadrumodelsproducedbyAutoMLEdge.Backeds/Platforms:
TesorFlow.jsCPUBacked,pure-JSbackedforNode.jsadthebrowser.TesorFlow.jsWebGLBacked,WebGLbackedforthebrowser.TesorFlow.jsWASMBacked,WebAssemblybackedforthebrowser.TesorFlow.jsWebGPU,WebGPUbackedforthebrowser.TesorFlow.jsNode,Node.jsplatformviaTesorFlowC++adapter.TesorFlow.jsReactNative,ReactNativeplatformviaexpo-gladapter.Ifyoucareaboutbudlesize,youcaimportthosepackagesidividually.
IfyouarelookigforNode.jssupport,checkouttheTesorFlow.jsNodedirectory.
ExamplesCheckoutourexamplesrepositoryadourtutorials.
GalleryBesuretocheckoutthegalleryofallprojectsrelatedtoTesorFlow.js.
Pre-traiedmodelsBesuretoalsocheckoutourmodelsrepositorywherewehostpre-traiedmodelsoNPM.
BechmarksLocalbechmarktool.Usethiswebpagetooltocollecttheperformacerelatedmetrics(speed,memory,etc)ofTesorFlow.jsmodelsadkerelsoyourlocaldevicewithCPU,WebGLorWASMbackeds.Youcabechmarkcustommodelsbyfollowigthisguide.Multi-devicebechmarktool.Usethistooltocollectthesameperformacerelatedmetricsoacollectioofremotedevices.GettigstartedTherearetwomaiwaystogetTesorFlow.jsiyourJavaScriptproject:viascripttagsorbyistalligitfromNPMadusigabuildtoollikeParcel,WebPack,orRollup.
viaScriptTagAddthefollowigcodetoaHTMLfile:







评论