Skip to content

Commit

Permalink
Update view.js (#1240)
Browse files Browse the repository at this point in the history
  • Loading branch information
lutzroeder committed Jun 9, 2024
1 parent af95153 commit b546ffd
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions source/view.js
Original file line number Diff line number Diff line change
Expand Up @@ -3607,6 +3607,15 @@ view.FindSidebar = class extends view.Control {
}
};

view.Argument = class {

constructor(name, value, type) {
this.name = name;
this.value = value;
this.type = type;
}
};

view.Tensor = class {

constructor(tensor) {
Expand Down Expand Up @@ -4094,6 +4103,15 @@ view.Tensor = class {
return `${indentation}(undefined)`;
}
}

get metrics() {
const entries = this._tensor.metrics || [];
const metrics = new Map(entries.map((entry) => [entry.name, entry]));
if (!metrics.has('sparisity')) {
// this.metrics.set('sparisity', new view.Argument('sparisity', 0, 'float32'));
}
return Array.from(metrics);
}
};

view.Quantization = class {
Expand Down

0 comments on commit b546ffd

Please sign in to comment.