MCPcopy Create free account
hub / github.com/FoundationVision/ByteTrack / forward

Method forward

yolox/models/yolox.py:28–48  ·  view source on GitHub ↗
(self, x, targets=None)

Source from the content-addressed store, hash-verified

26 self.head = head
27
28 def forward(self, x, targets=None):
29 # fpn output content features of [dark3, dark4, dark5]
30 fpn_outs = self.backbone(x)
31
32 if self.training:
33 assert targets is not None
34 loss, iou_loss, conf_loss, cls_loss, l1_loss, num_fg = self.head(
35 fpn_outs, targets, x
36 )
37 outputs = {
38 "total_loss": loss,
39 "iou_loss": iou_loss,
40 "l1_loss": l1_loss,
41 "conf_loss": conf_loss,
42 "cls_loss": cls_loss,
43 "num_fg": num_fg,
44 }
45 else:
46 outputs = self.head(fpn_outs)
47
48 return outputs

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected