Lutz Roeder 3 лет назад
Родитель
Сommit
198d2ef4ce
2 измененных файлов с 10 добавлено и 0 удалено
  1. 3 0
      source/pytorch.js
  2. 7 0
      test/models.json

+ 3 - 0
source/pytorch.js

@@ -1751,6 +1751,9 @@ pytorch.Execution = class extends python.Execution {
             throw new pytorch.Error("Unsupported 'torch.remainder' expression type.");
         });
         this.registerFunction('torch.ne', function(left, right) {
+            if (typeof left === 'boolean' && typeof right === 'boolean') {
+                return left !== right;
+            }
             if (typeof left === 'number' && typeof right === 'number') {
                 if (isNaN(left) || isNaN(right)) {
                     return false;

+ 7 - 0
test/models.json

@@ -4623,6 +4623,13 @@
     "format":   "TorchScript v1.5",
     "link":     "https://github.com/lutzroeder/netron/issues/546"
   },
+  {
+    "type":     "pytorch",
+    "target":   "resnext50_32x4d_fpn.pth",
+    "source":   "https://github.com/lutzroeder/netron/files/8985800/resnext50_32x4d_fpn.pth.zip[resnext50_32x4d_fpn.pth]",
+    "format":   "TorchScript v1.7",
+    "link":     "https://github.com/lutzroeder/netron/issues/842"
+  },
   {
     "type":     "pytorch",
     "target":   "resnet101.pkl.pth.zip",