set self.num_features to neck_chans if neck_chans > 0

This commit is contained in:
Yonghye Kwon 2023-08-11 13:45:06 +09:00 committed by GitHub
parent 3a44e6c602
commit 2048f6f20f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -434,6 +434,7 @@ class VisionTransformerSAM(nn.Module):
),
LayerNorm2d(neck_chans),
)
self.num_features = neck_chans
else:
self.neck = nn.Identity()
neck_chans = embed_dim