Skip to content

Commit

Permalink
Add TorchScript test file (#842) (#1001)
Browse files Browse the repository at this point in the history
  • Loading branch information
lutzroeder committed Nov 24, 2022
1 parent 43ab973 commit 8ebadc1
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
1 change: 1 addition & 0 deletions source/pytorch.js
Original file line number Diff line number Diff line change
Expand Up @@ -1978,6 +1978,7 @@ pytorch.Container.Zip.Execution = class extends pytorch.Execution {
for (let i = 0; i < schema.outputs.length; i++) {
const parameter = schema.outputs[i];
switch (parameter.type) {
case 'Scalar':
case 'Tensor': {
const output = this.invoke('torch.Tensor', []);
output.__origin__ = type;
Expand Down
8 changes: 8 additions & 0 deletions test/models.json
Original file line number Diff line number Diff line change
Expand Up @@ -4362,6 +4362,14 @@
"format": "TorchScript v1.3",
"link": "https://github.com/lutzroeder/netron/issues/281"
},
{
"type": "pytorch",
"target": "mask_model.pt",
"source": "https://github.com/lutzroeder/netron/files/10080302/mask_model.pt.zip[mask_model.pt]",
"format": "TorchScript v1.7",
"error": "Unsupported torch.add expression type in 'mask_model.pt'.",
"link": "https://github.com/lutzroeder/netron/issues/842"
},
{
"type": "pytorch",
"target": "mask_r_cnn.pth",
Expand Down

0 comments on commit 8ebadc1

Please sign in to comment.