Merge pull request #1914 from developer0hye/developer0hye-patch-1

Set self.num_features to neck_chans if neck_chans > 0 for vision_transformer_sam
This commit is contained in:
Ross Wightman 2023-08-11 11:23:57 -07:00 committed by GitHub
commit 379998ed5d
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