MCPcopy Create free account
hub / github.com/tensorflow/tfjs-examples / loadHostedPretrainedModel

Function loadHostedPretrainedModel

iris-fitDataset/loader.js:39–49  ·  view source on GitHub ↗
(url)

Source from the content-addressed store, hash-verified

37 * @return An instance of `tf.Model` with model topology and weights loaded.
38 */
39export async function loadHostedPretrainedModel(url) {
40 ui.status('Loading pretrained model from ' + url);
41 try {
42 const model = await tf.loadLayersModel(url);
43 ui.status('Done loading pretrained model.');
44 return model;
45 } catch (err) {
46 console.error(err);
47 ui.status('Loading pretrained model failed.');
48 }
49}
50
51// The URL-like path that identifies the client-side location where downloaded
52// or locally trained models can be stored.

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected