-
Notifications
You must be signed in to change notification settings - Fork 39
/
resnetv2.py
61 lines (44 loc) · 1.46 KB
/
resnetv2.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
#!/usr/bin/env python
# -*- coding: utf-8 -*-
# @Author: zcy
# @Date: 2019-02-14 19:29:27
# @Last Modified by: zcy
# @Last Modified time: 2019-02-15 12:58:18
from models.StereoCNN.Resnetv2_module import *
__all__ = [
'resnet18v2_3d', 'resnet34v2_3d', 'resnet50v2_3d', 'resnet101v2_3d',
'resnet152v2_3d', 'resnet200v2_3d'
]
def resnet18v2_3d(**kwargs):
"""Constructs a ResNet-18 model.
"""
model = PreActivationResNet(PreActivationBasicBlock, [2, 2, 2, 2], **kwargs)
return model
def resnet34v2_3d(**kwargs):
"""Constructs a ResNet-34 model.
"""
model = PreActivationResNet(PreActivationBasicBlock, [3, 4, 6, 3], **kwargs)
return model
def resnet50v2_3d(**kwargs):
"""Constructs a ResNet-50 model.
"""
model = PreActivationResNet(PreActivationBottleneck, [3, 4, 6, 3], **kwargs)
return model
def resnet101v2_3d(**kwargs):
"""Constructs a ResNet-101 model.
"""
model = PreActivationResNet(PreActivationBottleneck, [3, 4, 23, 3],
**kwargs)
return model
def resnet152v2_3d(**kwargs):
"""Constructs a ResNet-101 model.
"""
model = PreActivationResNet(PreActivationBottleneck, [3, 8, 36, 3],
**kwargs)
return model
def resnet200v2_3d(**kwargs):
"""Constructs a ResNet-101 model.
"""
model = PreActivationResNet(PreActivationBottleneck, [3, 24, 36, 3],
**kwargs)
return model