2020-08-20 02:05:34 +02:00
|
|
|
"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 = [];
|
2020-08-20 02:05:34 +02:00
|
|
|
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 }
|
|
|
|
};
|
|
|
|
}
|
2020-08-20 02:05:34 +02:00
|
|
|
exports.extractParams = extractParams;
|
2020-08-18 14:04:33 +02:00
|
|
|
//# sourceMappingURL=extractParams.js.map
|