disposeUnusedWeightTensors.js 324 B

12345678
  1. export function disposeUnusedWeightTensors(weightMap, paramMappings) {
  2. Object.keys(weightMap).forEach(function (path) {
  3. if (!paramMappings.some(function (pm) { return pm.originalPath === path; })) {
  4. weightMap[path].dispose();
  5. }
  6. });
  7. }
  8. //# sourceMappingURL=disposeUnusedWeightTensors.js.map