14 spatial_stride: int = 1,
15 temporal_stride: int = 1,
17 downsample: Optional[nn.Module] =
None,
19 inflate_style: str =
'3x1x1') ->
None:
40 if inflate_style ==
'3x1x1':
41 conv1_kernel_size = (3, 1, 1)
42 conv1_padding = (1, 0, 0)
43 conv2_kernel_size = (1, 3, 3)
44 conv2_padding = (0, dilation, dilation)
46 conv1_kernel_size = (1, 1, 1)
47 conv1_padding = (0, 0, 0)
48 conv2_kernel_size = (3, 3, 3)
49 conv2_padding = (1, dilation, dilation)
51 conv1_kernel_size = (1, 1, 1)
52 conv1_padding = (0, 0, 0)
53 conv2_kernel_size = (1, 3, 3)
54 conv2_padding = (0, dilation, dilation)
57 self.
conv1 = nn.Sequential(nn.Conv3d(inplanes, planes, kernel_size=conv1_kernel_size, stride=conv1_stride, padding=conv1_padding, bias=
False),
58 nn.BatchNorm3d(planes),
59 nn.ReLU(inplace=
True))
61 self.
conv2 = nn.Sequential(nn.Conv3d(planes, planes, kernel_size=conv2_kernel_size, stride=conv2_stride, padding=conv2_padding, bias=
False),
62 nn.BatchNorm3d(planes),
63 nn.ReLU(inplace=
True))
69 self.
relu = nn.ReLU(inplace=
True)