face-api/build/faceProcessor/extractParams.js

19 lines
776 B
JavaScript
Raw Normal View History

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.extractParams = void 0;
const common_1 = require("../common");
function extractParams(weights, channelsIn, channelsOut) {
2020-08-18 14:04:33 +02:00
const paramMappings = [];
const { extractWeights, getRemainingWeights } = common_1.extractWeightsFactory(weights);
const extractFCParams = common_1.extractFCParamsFactory(extractWeights, paramMappings);
2020-08-18 14:04:33 +02:00
const fc = extractFCParams(channelsIn, channelsOut, 'fc');
if (getRemainingWeights().length !== 0) {
throw new Error(`weights remaing after extract: ${getRemainingWeights().length}`);
}
return {
paramMappings,
params: { fc }
};
}
exports.extractParams = extractParams;
2020-08-18 14:04:33 +02:00
//# sourceMappingURL=extractParams.js.map