ultralytics 8.0.120 CLI support for SAM, RTDETR (#3273)
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
This commit is contained in:
parent
2e8313b032
commit
d8701b42ca
6 changed files with 27 additions and 7 deletions
|
|
@ -243,6 +243,8 @@ class DetectionModel(BaseModel):
|
|||
m.stride = torch.tensor([s / x.shape[-2] for x in forward(torch.zeros(1, ch, s, s))]) # forward
|
||||
self.stride = m.stride
|
||||
m.bias_init() # only run once
|
||||
else:
|
||||
self.stride = torch.Tensor([32]) # default stride for i.e. RTDETR
|
||||
|
||||
# Init weights, biases
|
||||
initialize_weights(self)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue