Skip to content

Commit

Permalink
Replace SPP with SPPF in darknet
Browse files Browse the repository at this point in the history
  • Loading branch information
zhiqwang committed Oct 8, 2021
1 parent 2b52e89 commit 451f3e4
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions yolort/models/darknetv5.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
from torch import nn, Tensor
from torch.hub import load_state_dict_from_url

from yolort.v5 import Conv, Focus, BottleneckCSP, C3, SPP
from yolort.v5 import Conv, Focus, BottleneckCSP, C3, SPPF
from ._utils import _make_divisible


Expand Down Expand Up @@ -88,7 +88,7 @@ def __init__(
# building last CSP blocks
last_channel = _make_divisible(last_channel * width_multiple, round_nearest)
layers.append(Conv(input_channel, last_channel, k=3, s=2, version=version))
layers.append(SPP(last_channel, last_channel, k=(5, 9, 13), version=version))
layers.append(SPPF(last_channel, last_channel, k=5, version=version))

self.features = nn.Sequential(*layers)
self.avgpool = nn.AdaptiveAvgPool2d(1)
Expand Down

0 comments on commit 451f3e4

Please sign in to comment.