MCPcopy
hub / github.com/tensorflow/tfjs / loadWeights

Method loadWeights

tfjs-core/src/io/http.ts:234–241  ·  view source on GitHub ↗
(weightsManifest: WeightsManifestConfig)

Source from the content-addressed store, hash-verified

232 }
233
234 private async loadWeights(weightsManifest: WeightsManifestConfig):
235 Promise<[WeightsManifestEntry[], WeightData]> {
236 const fetchURLs = await this.getWeightUrls(weightsManifest);
237 const weightSpecs = getWeightSpecs(weightsManifest);
238
239 const buffers = await loadWeightsAsArrayBuffer(fetchURLs, this.loadOptions);
240 return [weightSpecs, buffers];
241 }
242}
243
244/**

Callers 6

loadMethod · 0.95
modelFromJSONFunction · 0.45
topology_test.tsFile · 0.45
quantizationTestFunction · 0.45

Calls 3

getWeightUrlsMethod · 0.95
getWeightSpecsFunction · 0.90
loadWeightsAsArrayBufferFunction · 0.90

Tested by

no test coverage detected