2020-08-20 02:10:42 +02:00
|
|
|
import * as tf from '@tensorflow/tfjs-core';
|
|
|
|
import { getModelUris } from '../common/getModelUris';
|
|
|
|
import { fetchJson } from './fetchJson';
|
|
|
|
export async function loadWeightMap(uri, defaultModelName) {
|
|
|
|
const { manifestUri, modelBaseUri } = getModelUris(uri, defaultModelName);
|
|
|
|
const manifest = await fetchJson(manifestUri);
|
2020-08-26 00:24:48 +02:00
|
|
|
console.log(typeof manifest, manifest);
|
2020-08-18 14:04:33 +02:00
|
|
|
return tf.io.loadWeights(manifest, modelBaseUri);
|
|
|
|
}
|
|
|
|
//# sourceMappingURL=loadWeightMap.js.map
|