Skip to content

Commit

Permalink
Update pytorch.js
Browse files Browse the repository at this point in the history
  • Loading branch information
lutzroeder committed Oct 11, 2024
1 parent b21850d commit db7ca37
Show file tree
Hide file tree
Showing 5 changed files with 2,648 additions and 592 deletions.
5 changes: 4 additions & 1 deletion source/python.js
Original file line number Diff line number Diff line change
Expand Up @@ -6163,7 +6163,7 @@ python.Execution = class {
});
this.registerType('torch.ClassType', class extends torch.Type {
constructor(qualified_name, cu, is_module) {
super();
super('ClassType');
this._qualified_name = qualified_name;
this._is_module = is_module;
this._attributes = new Map();
Expand Down Expand Up @@ -6328,6 +6328,9 @@ python.Execution = class {
getValueType() {
return this._value;
}
__str__() {
return `Dict(${this.getKeyType().toString()}, ${this.getValueType().toString()})`;
}
});
this.registerType('torch.DeviceObjType', class extends torch.Type {
constructor() {
Expand Down
Loading

0 comments on commit db7ca37

Please sign in to comment.