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 12, 2024
1 parent 0cb3c3c commit b170b44
Show file tree
Hide file tree
Showing 5 changed files with 1,627 additions and 528 deletions.
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 b170b44

Please sign in to comment.