"vscode:/vscode.git/clone" did not exist on "8a83cf2e2b8aed7f0cd42c05e5e23f4cb6d0bf6a"
Unverified Commit 222a599e authored by eellison's avatar eellison Committed by GitHub
Browse files

remove script classes (#2210)


Co-authored-by: default avatareellison <eellison@fb.com>
parent 7ed3950e
......@@ -34,7 +34,6 @@ default_timebase = Fraction(0, 1)
# 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"]
......@@ -49,7 +48,6 @@ class Timebase(object):
self.denominator = denominator
@torch.jit.script
class VideoMetaData(object):
__annotations__ = {
"has_video": bool,
......
......@@ -13,7 +13,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
......@@ -131,7 +130,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
......@@ -226,7 +224,6 @@ class BoxCoder(object):
return pred_boxes
@torch.jit.script
class Matcher(object):
"""
This class assigns to each predicted "element" (e.g., a box) a ground-truth
......
......@@ -4,7 +4,6 @@ from torch.jit.annotations import List, Tuple
from torch import Tensor
@torch.jit.script
class ImageList(object):
"""
Structure that holds a list of images (of possibly
......
......@@ -38,7 +38,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.
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment