Skip to content

Commit

Permalink
Update pytorch.js
Browse files Browse the repository at this point in the history
  • Loading branch information
lutzroeder committed Nov 2, 2024
1 parent d867abf commit 18f0450
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
2 changes: 2 additions & 0 deletions source/python.js
Original file line number Diff line number Diff line change
Expand Up @@ -5211,6 +5211,7 @@ python.Execution = class {
this.registerType('torchvision.transforms.transforms.ToPILImage', class {});
this.registerType('torchvision.transforms.transforms.ToTensor', class {});
this.registerType('torchvision.transforms.v2._container.Compose', class {});
this.registerType('torchvision.transforms.v2._misc.ConvertImageDtype', class {});
this.registerType('torchvision.transforms.v2._misc.Normalize', class {});
this.registerType('torchvision.transforms.v2._misc.ToDtype', class {});
this.registerType('torchvision.transforms.v2._geometry.CenterCrop', class {});
Expand All @@ -5219,6 +5220,7 @@ python.Execution = class {
this.registerType('torchvision.transforms.v2._geometry.RandomCrop', class {});
this.registerType('torchvision.transforms.v2._transform.Transform', class extends torch.nn.modules.module.Module {});
this.registerType('torchvision.transforms.v2._type_conversion.ToImage', class extends torchvision.transforms.v2._transform.Transform {});
this.registerType('torchvision.transforms.v2._type_conversion.PILToTensor', class {});
this.registerFunction('torchvision.models.resnet.resnet18', () => {});
this.registerFunction('torchvision.models.resnet.resnet34', () => {});
this.registerFunction('torchvision.models.resnet.resnet50', () => {});
Expand Down
1 change: 1 addition & 0 deletions source/pytorch.js
Original file line number Diff line number Diff line change
Expand Up @@ -2611,6 +2611,7 @@ pytorch.Execution = class extends python.Execution {
return obj;
}
const node = this.graph.create('prim::CallMethod');
node.setSourceRange(location);
this.graph.insertNode(node);
node.s_('name', name);
node.addInput(obj);
Expand Down

0 comments on commit 18f0450

Please sign in to comment.