diff --git a/source/pytorch.js b/source/pytorch.js index 80c144fc2f..64082b4a09 100644 --- a/source/pytorch.js +++ b/source/pytorch.js @@ -2055,6 +2055,10 @@ pytorch.Container.Zip.Execution = class extends pytorch.Execution { case 'torch.hardtanh_': case 'torch.upsample_bilinear2d': case 'ops.prepacked.conv2d_clamp_run': { + const input = evalArgs[0]; + if (pytorch.Utility.isTensor(input) && input.size() === undefined) { + input.resize_([ NaN, NaN, NaN, NaN ]); + } parameter.resize_([ NaN, NaN, NaN, NaN ]); break; } @@ -2086,6 +2090,7 @@ pytorch.Container.Zip.Execution = class extends pytorch.Execution { case 'torch.gelu': case 'torch.relu': case 'torch.clamp_': + case 'torch._add_relu_': case 'torch.hardswish_': { const input = evalArgs[0]; if (pytorch.Utility.isTensor(input) && Array.isArray(input.size())) { diff --git a/test/models.json b/test/models.json index bc9a2a3c60..7018bddfbd 100644 --- a/test/models.json +++ b/test/models.json @@ -4160,6 +4160,13 @@ "format": "TorchScript v1.6", "link": "https://github.com/lutzroeder/netron/issues/630" }, + { + "type": "pytorch", + "target": "deeplabv3_scripted.ptl", + "source": "https://github.com/lutzroeder/netron/files/9562007/deeplabv3_scripted.ptl.zip[deeplabv3_scripted.ptl]", + "format": "TorchScript v1.6", + "link": "https://github.com/lutzroeder/netron/issues/842" + }, { "type": "pytorch", "target": "DCGAN2.pt",