"src/git@developer.sourcefind.cn:renzhc/diffusers_dcu.git" did not exist on "759ea587082aa0e77449952d8f3523f28ddc61f3"
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(): ...@@ -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] != "_"] 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", "deeplabv3_resnet101",
"mobilenet_v2", "mobilenet_v2",
"resnext50_32x4d", "resnext50_32x4d",
...@@ -48,12 +51,13 @@ torchub_models = [ ...@@ -48,12 +51,13 @@ torchub_models = [
"squeezenet1_0", "squeezenet1_0",
"vgg11", "vgg11",
"inception_v3", "inception_v3",
'r3d_18',
] ]
class ModelTester(TestCase): class ModelTester(TestCase):
def check_script(self, model, name): def check_script(self, model, name):
if name not in torchub_models: if name not in script_test_models:
return return
scriptable = True scriptable = True
msg = "" msg = ""
......
...@@ -81,6 +81,7 @@ class Conv3DNoTemporal(nn.Conv3d): ...@@ -81,6 +81,7 @@ class Conv3DNoTemporal(nn.Conv3d):
class BasicBlock(nn.Module): class BasicBlock(nn.Module):
__constants__ = ['downsample']
expansion = 1 expansion = 1
def __init__(self, inplanes, planes, conv_builder, stride=1, downsample=None): 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