Lutz Roeder 6 роки тому
батько
коміт
4c2a0daf51
1 змінених файлів з 6 додано та 0 видалено
  1. 6 0
      src/pytorch.js

+ 6 - 0
src/pytorch.js

@@ -1124,6 +1124,9 @@ pytorch.Execution = class {
         this._registerConstructor('torchvision.models.detection.faster_rcnn.FasterRCNN', function() {});
         this._registerConstructor('torchvision.models.detection.faster_rcnn.FastRCNNPredictor', function() {});
         this._registerConstructor('torchvision.models.detection.faster_rcnn.TwoMLPHead', function() {});
+        this._registerConstructor('torchvision.models.detection.mask_rcnn.MaskRCNN', function() {});
+        this._registerConstructor('torchvision.models.detection.mask_rcnn.MaskRCNNHeads', function() {});
+        this._registerConstructor('torchvision.models.detection.mask_rcnn.MaskRCNNPredictor', function() {});
         this._registerConstructor('torchvision.models.detection.roi_heads.RoIHeads', function() {});
         this._registerConstructor('torchvision.models.detection.rpn.AnchorGenerator', function() {});
         this._registerConstructor('torchvision.models.detection.rpn.RegionProposalNetwork', function() {});
@@ -1339,6 +1342,9 @@ pytorch.Execution = class {
             }
             throw new pytorch.Error("Unsupported bytearray encoding '" + JSON.stringify(encoding) + "'.");
         });
+        this._registerFunction('__builtin__.slice', function(start, stop , step) {
+            return [ start, stop, step ];
+        });
         this._registerFunction('collections.Counter', function(/* iterable */) {
             return {};
         });