Set self.num_features to neck_chans if neck_chans > 0 for vision_transformer_sam
diff --git a/timm/models/vision_transformer_sam.py b/timm/models/vision_transformer_sam.py
index c561ea1b22..9beb7b0162 100644
--- a/timm/models/vision_transformer_sam.py
+++ b/timm/models/vision_transformer_sam.py
@@ -434,6 +434,7 @@ def __init__(
                 ),
                 LayerNorm2d(neck_chans),
             )
+            self.num_features = neck_chans
         else:
             self.neck = nn.Identity()
             neck_chans = embed_dim

Knowing the number of feature channels is crucial when this neural network is used as a backbone in other systems. It allows for better integration and adaptability with various architectures that might require information about the dimensions of the output features. I think that self.num_features should be neck_chans if neck_chans > 0.