disposeUnusedWeightTensors.js 459 B

1234567891011
  1. "use strict";
  2. Object.defineProperty(exports, "__esModule", { value: true });
  3. function disposeUnusedWeightTensors(weightMap, paramMappings) {
  4. Object.keys(weightMap).forEach(function (path) {
  5. if (!paramMappings.some(function (pm) { return pm.originalPath === path; })) {
  6. weightMap[path].dispose();
  7. }
  8. });
  9. }
  10. exports.disposeUnusedWeightTensors = disposeUnusedWeightTensors;
  11. //# sourceMappingURL=disposeUnusedWeightTensors.js.map