MCPcopy Index your code
hub / github.com/FoundationVision/ByteTrack / initialize_biases

Method initialize_biases

yolox/models/yolo_head.py:134–143  ·  view source on GitHub ↗
(self, prior_prob)

Source from the content-addressed store, hash-verified

132 self.expanded_strides = [None] * len(in_channels)
133
134 def initialize_biases(self, prior_prob):
135 for conv in self.cls_preds:
136 b = conv.bias.view(self.n_anchors, -1)
137 b.data.fill_(-math.log((1 - prior_prob) / prior_prob))
138 conv.bias = torch.nn.Parameter(b.view(-1), requires_grad=True)
139
140 for conv in self.obj_preds:
141 b = conv.bias.view(self.n_anchors, -1)
142 b.data.fill_(-math.log((1 - prior_prob) / prior_prob))
143 conv.bias = torch.nn.Parameter(b.view(-1), requires_grad=True)
144
145 def forward(self, xin, labels=None, imgs=None):
146 outputs = []

Callers 4

get_modelMethod · 0.80
get_modelMethod · 0.80
get_modelMethod · 0.80
get_modelMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected