Commit bf859579 authored by eellison's avatar eellison Committed by Francisco Massa
Browse files

Add Script Support for Video Resnet Models (#1393)

* add support for video resnet models, restructure script test to just ignore RCNN models

* switch back to testing subset of the models
parent e160cce3
......@@ -35,7 +35,10 @@ def get_available_video_models():
return [k for k, v in models.video.__dict__.items() if callable(v) and k[0].lower() == k[0] and k[0] != "_"]
torchub_models = [
# models that are in torch hub, as well as r3d_18. we tried testing all models
# but the test was too slow. not included are detection models, because
# they are not yet supported in JIT.
script_test_models = [
"deeplabv3_resnet101",
"mobilenet_v2",
"resnext50_32x4d",
......@@ -48,12 +51,13 @@ torchub_models = [
"squeezenet1_0",
"vgg11",
"inception_v3",
'r3d_18',
]
class ModelTester(TestCase):
def check_script(self, model, name):
if name not in torchub_models:
if name not in script_test_models:
return
scriptable = True
msg = ""
......
......@@ -81,6 +81,7 @@ class Conv3DNoTemporal(nn.Conv3d):
class BasicBlock(nn.Module):
__constants__ = ['downsample']
expansion = 1
def __init__(self, inplanes, planes, conv_builder, stride=1, downsample=None):
......
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