diff --git a/torchvision/io/_video_opt.py b/torchvision/io/_video_opt.py index 4c39529b950..e28c565bce7 100644 --- a/torchvision/io/_video_opt.py +++ b/torchvision/io/_video_opt.py @@ -26,7 +26,6 @@ # simple class for torch scripting # the complex Fraction class from fractions module is not scriptable -@torch.jit.script class Timebase(object): __annotations__ = {"numerator": int, "denominator": int} __slots__ = ["numerator", "denominator"] @@ -41,7 +40,6 @@ def __init__( self.denominator = denominator -@torch.jit.script class VideoMetaData(object): __annotations__ = { "has_video": bool, diff --git a/torchvision/models/detection/_utils.py b/torchvision/models/detection/_utils.py index 10a13f37e6d..fedd5dc4a37 100644 --- a/torchvision/models/detection/_utils.py +++ b/torchvision/models/detection/_utils.py @@ -15,7 +15,6 @@ def zeros_like(tensor, dtype): device=tensor.device, pin_memory=tensor.is_pinned()) -@torch.jit.script class BalancedPositiveNegativeSampler(object): """ This class samples batches, ensuring that they contain a fixed proportion of positives @@ -133,7 +132,6 @@ def encode_boxes(reference_boxes, proposals, weights): return targets -@torch.jit.script class BoxCoder(object): """ This class encodes and decodes a set of bounding boxes into @@ -228,7 +226,6 @@ def decode_single(self, rel_codes, boxes): return pred_boxes -@torch.jit.script class Matcher(object): """ This class assigns to each predicted "element" (e.g., a box) a ground-truth diff --git a/torchvision/models/detection/image_list.py b/torchvision/models/detection/image_list.py index e805e70163b..ca0f5b20c31 100644 --- a/torchvision/models/detection/image_list.py +++ b/torchvision/models/detection/image_list.py @@ -6,7 +6,6 @@ from torch import Tensor -@torch.jit.script class ImageList(object): """ Structure that holds a list of images (of possibly diff --git a/torchvision/ops/poolers.py b/torchvision/ops/poolers.py index 0e43a896cac..d2af3b75235 100644 --- a/torchvision/ops/poolers.py +++ b/torchvision/ops/poolers.py @@ -39,7 +39,6 @@ def initLevelMapper(k_min, k_max, canonical_scale=224, canonical_level=4, eps=1e return LevelMapper(k_min, k_max, canonical_scale, canonical_level, eps) -@torch.jit.script class LevelMapper(object): """Determine which FPN level each RoI in a set of RoIs should map to based on the heuristic in the FPN paper.