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

Method forward

slowfast/models/ptv_model_builder.py:207–219  ·  view source on GitHub ↗
(self, x, bboxes=None)

Source from the content-addressed store, hash-verified

205 self.post_act = head_act
206
207 def forward(self, x, bboxes=None):
208 x = x[0]
209 x = self.model(x)
210 if self.detection_mode:
211 x = self.detection_head(x, bboxes)
212 x = self.post_act(x)
213 else:
214 # Performs fully convlutional inference.
215 if not self.training:
216 x = self.post_act(x)
217 x = x.mean([2, 3, 4])
218 x = x.view(x.shape[0], -1)
219 return x
220
221
222@MODEL_REGISTRY.register()

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected