Ultralytics Code Refactor https://ultralytics.com/actions (#16047)
Co-authored-by: Glenn Jocher <glenn.jocher@ultralytics.com>
This commit is contained in:
parent
95d54828bb
commit
ac2c2be8f3
12 changed files with 45 additions and 62 deletions
|
|
@ -491,12 +491,11 @@ class ImageEncoder(nn.Module):
|
|||
features, pos = features[: -self.scalp], pos[: -self.scalp]
|
||||
|
||||
src = features[-1]
|
||||
output = {
|
||||
return {
|
||||
"vision_features": src,
|
||||
"vision_pos_enc": pos,
|
||||
"backbone_fpn": features,
|
||||
}
|
||||
return output
|
||||
|
||||
|
||||
class FpnNeck(nn.Module):
|
||||
|
|
@ -577,7 +576,7 @@ class FpnNeck(nn.Module):
|
|||
|
||||
self.convs.append(current)
|
||||
self.fpn_interp_model = fpn_interp_model
|
||||
assert fuse_type in ["sum", "avg"]
|
||||
assert fuse_type in {"sum", "avg"}
|
||||
self.fuse_type = fuse_type
|
||||
|
||||
# levels to have top-down features in its outputs
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue