face-api.js
Version:
JavaScript API for face detection and face recognition in the browser with tensorflow.js
15 lines • 734 B
JavaScript
Object.defineProperty(exports, "__esModule", { value: true });
var utils_1 = require("../utils");
function extractWeightEntryFactory(weightMap, paramMappings) {
return function (originalPath, paramRank, mappedPath) {
var tensor = weightMap[originalPath];
if (!utils_1.isTensor(tensor, paramRank)) {
throw new Error("expected weightMap[" + originalPath + "] to be a Tensor" + paramRank + "D, instead have " + tensor);
}
paramMappings.push({ originalPath: originalPath, paramPath: mappedPath || originalPath });
return tensor;
};
}
exports.extractWeightEntryFactory = extractWeightEntryFactory;
//# sourceMappingURL=extractWeightEntryFactory.js.map
;