Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
OpenDAS
vision
Commits
222a599e
Unverified
Commit
222a599e
authored
May 18, 2020
by
eellison
Committed by
GitHub
May 18, 2020
Browse files
remove script classes (#2210)
Co-authored-by:
eellison
<
eellison@fb.com
>
parent
7ed3950e
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
0 additions
and
7 deletions
+0
-7
torchvision/io/_video_opt.py
torchvision/io/_video_opt.py
+0
-2
torchvision/models/detection/_utils.py
torchvision/models/detection/_utils.py
+0
-3
torchvision/models/detection/image_list.py
torchvision/models/detection/image_list.py
+0
-1
torchvision/ops/poolers.py
torchvision/ops/poolers.py
+0
-1
No files found.
torchvision/io/_video_opt.py
View file @
222a599e
...
@@ -34,7 +34,6 @@ default_timebase = Fraction(0, 1)
...
@@ -34,7 +34,6 @@ default_timebase = Fraction(0, 1)
# simple class for torch scripting
# simple class for torch scripting
# the complex Fraction class from fractions module is not scriptable
# the complex Fraction class from fractions module is not scriptable
@
torch
.
jit
.
script
class
Timebase
(
object
):
class
Timebase
(
object
):
__annotations__
=
{
"numerator"
:
int
,
"denominator"
:
int
}
__annotations__
=
{
"numerator"
:
int
,
"denominator"
:
int
}
__slots__
=
[
"numerator"
,
"denominator"
]
__slots__
=
[
"numerator"
,
"denominator"
]
...
@@ -49,7 +48,6 @@ class Timebase(object):
...
@@ -49,7 +48,6 @@ class Timebase(object):
self
.
denominator
=
denominator
self
.
denominator
=
denominator
@
torch
.
jit
.
script
class
VideoMetaData
(
object
):
class
VideoMetaData
(
object
):
__annotations__
=
{
__annotations__
=
{
"has_video"
:
bool
,
"has_video"
:
bool
,
...
...
torchvision/models/detection/_utils.py
View file @
222a599e
...
@@ -13,7 +13,6 @@ def zeros_like(tensor, dtype):
...
@@ -13,7 +13,6 @@ def zeros_like(tensor, dtype):
device
=
tensor
.
device
,
pin_memory
=
tensor
.
is_pinned
())
device
=
tensor
.
device
,
pin_memory
=
tensor
.
is_pinned
())
@
torch
.
jit
.
script
class
BalancedPositiveNegativeSampler
(
object
):
class
BalancedPositiveNegativeSampler
(
object
):
"""
"""
This class samples batches, ensuring that they contain a fixed proportion of positives
This class samples batches, ensuring that they contain a fixed proportion of positives
...
@@ -131,7 +130,6 @@ def encode_boxes(reference_boxes, proposals, weights):
...
@@ -131,7 +130,6 @@ def encode_boxes(reference_boxes, proposals, weights):
return
targets
return
targets
@
torch
.
jit
.
script
class
BoxCoder
(
object
):
class
BoxCoder
(
object
):
"""
"""
This class encodes and decodes a set of bounding boxes into
This class encodes and decodes a set of bounding boxes into
...
@@ -226,7 +224,6 @@ class BoxCoder(object):
...
@@ -226,7 +224,6 @@ class BoxCoder(object):
return
pred_boxes
return
pred_boxes
@
torch
.
jit
.
script
class
Matcher
(
object
):
class
Matcher
(
object
):
"""
"""
This class assigns to each predicted "element" (e.g., a box) a ground-truth
This class assigns to each predicted "element" (e.g., a box) a ground-truth
...
...
torchvision/models/detection/image_list.py
View file @
222a599e
...
@@ -4,7 +4,6 @@ from torch.jit.annotations import List, Tuple
...
@@ -4,7 +4,6 @@ from torch.jit.annotations import List, Tuple
from
torch
import
Tensor
from
torch
import
Tensor
@
torch
.
jit
.
script
class
ImageList
(
object
):
class
ImageList
(
object
):
"""
"""
Structure that holds a list of images (of possibly
Structure that holds a list of images (of possibly
...
...
torchvision/ops/poolers.py
View file @
222a599e
...
@@ -38,7 +38,6 @@ def initLevelMapper(k_min, k_max, canonical_scale=224, canonical_level=4, eps=1e
...
@@ -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
)
return
LevelMapper
(
k_min
,
k_max
,
canonical_scale
,
canonical_level
,
eps
)
@
torch
.
jit
.
script
class
LevelMapper
(
object
):
class
LevelMapper
(
object
):
"""Determine which FPN level each RoI in a set of RoIs should map to based
"""Determine which FPN level each RoI in a set of RoIs should map to based
on the heuristic in the FPN paper.
on the heuristic in the FPN paper.
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment