2020-08-20 02:10:42 +02:00
|
|
|
export function disposeUnusedWeightTensors(weightMap, paramMappings) {
|
2020-08-18 14:04:33 +02:00
|
|
|
Object.keys(weightMap).forEach(path => {
|
|
|
|
if (!paramMappings.some(pm => pm.originalPath === path)) {
|
|
|
|
weightMap[path].dispose();
|
|
|
|
}
|
|
|
|
});
|
|
|
|
}
|
|
|
|
//# sourceMappingURL=disposeUnusedWeightTensors.js.map
|