MCPcopy Create free account
hub / github.com/OpenGVLab/UniFormerV2 / _construct_stem

Method _construct_stem

slowfast/models/stem_helper.py:179–194  ·  view source on GitHub ↗
(self, dim_in, dim_out, norm_module)

Source from the content-addressed store, hash-verified

177 self._construct_stem(dim_in, dim_out, norm_module)
178
179 def _construct_stem(self, dim_in, dim_out, norm_module):
180 self.conv = nn.Conv3d(
181 dim_in,
182 dim_out,
183 self.kernel,
184 stride=self.stride,
185 padding=self.padding,
186 bias=False,
187 )
188 self.bn = norm_module(
189 num_features=dim_out, eps=self.eps, momentum=self.bn_mmt
190 )
191 self.relu = nn.ReLU(self.inplace_relu)
192 self.pool_layer = nn.MaxPool3d(
193 kernel_size=[1, 3, 3], stride=[1, 2, 2], padding=[0, 1, 1]
194 )
195
196 def forward(self, x):
197 x = self.conv(x)

Callers 1

__init__Method · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected