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 13, 2024
1 parent c4bf2ad commit 767de6d
Show file tree
Hide file tree
Showing 7 changed files with 1,734 additions and 541 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
"devDependencies": {
"@electron/notarize": "2.5.0",
"electron": "32.2.0",
"electron-builder": "25.1.7",
"electron-builder": "25.1.8",
"eslint": "9.12.0"
},
"build": {
Expand Down
17 changes: 15 additions & 2 deletions source/python.js
Original file line number Diff line number Diff line change
Expand Up @@ -6213,16 +6213,29 @@ python.Execution = class {
}
});
this.registerType('torch.TupleType', class extends torch.Type {
constructor() {
constructor(elements) {
super('TupleType');
this._elements = elements;
}
elements() {
return this._elements;
}
});
this.registerType('torch.TensorType', class extends torch.Type {
constructor() {
super('TensorType');
}
});
this.registerType('torch.AnyType', class extends torch.Type {});
this.registerType('torch.AnyType', class extends torch.Type {
constructor() {
super('AnyType');
}
});
this.registerType('torch.NoneType', class extends torch.Type {
constructor() {
super('NoneType');
}
});
this.registerType('torch.NumberType', class extends torch.Type {
constructor() {
super('NumberType');
Expand Down
Loading

0 comments on commit 767de6d

Please sign in to comment.