Skip to content

Commit

Permalink
Add TorchScript test file (#842)
Browse files Browse the repository at this point in the history
  • Loading branch information
lutzroeder committed May 28, 2023
1 parent d110fb3 commit f1c95a0
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
3 changes: 3 additions & 0 deletions source/python.js
Original file line number Diff line number Diff line change
Expand Up @@ -4879,6 +4879,9 @@ python.Execution = class {
}
return [];
});
this.registerFunction('torch.sqrt', function(x) {
return Math.sqrt(x);
});
this.registerFunction('torch.slice', function(l, start, end, step) {
if (!Array.isArray(l)) {
throw new python.Error('Slicing expected array');
Expand Down
7 changes: 7 additions & 0 deletions test/models.json
Original file line number Diff line number Diff line change
Expand Up @@ -4392,6 +4392,13 @@
"format": "TorchScript v1.0",
"link": "https://github.com/jiexiong2016/GCNv2_SLAM"
},
{
"type": "pytorch",
"target": "gpt2.pt",
"source": "https://github.com/lutzroeder/netron/files/11585383/gpt2.pt.zip[gpt2.pt]",
"format": "TorchScript v1.12",
"link": "https://github.com/lutzroeder/netron/issues/842"
},
{
"type": "pytorch",
"target": "inception_v3_traced.pt",
Expand Down

0 comments on commit f1c95a0

Please sign in to comment.