add the dropout_p parameter
diff --git a/models/common.py b/models/common.py
index 8b5ec1c786d..71340688d2e 100644
--- a/models/common.py
+++ b/models/common.py
@@ -846,12 +846,19 @@ def forward(self, x):
 
 class Classify(nn.Module):
     # YOLOv5 classification head, i.e. x(b,c1,20,20) to x(b,c2)
-    def __init__(self, c1, c2, k=1, s=1, p=None, g=1):  # ch_in, ch_out, kernel, stride, padding, groups
+    def __init__(self,
+                 c1,
+                 c2,
+                 k=1,
+                 s=1,
+                 p=None,
+                 g=1,
+                 dropout_p=0.0):  # ch_in, ch_out, kernel, stride, padding, groups, dropout probability
         super().__init__()
         c_ = 1280  # efficientnet_b0 size
         self.conv = Conv(c1, c_, k, s, autopad(k, p), g)
         self.pool = nn.AdaptiveAvgPool2d(1)  # to x(b,c_,1,1)
-        self.drop = nn.Dropout(p=0.0, inplace=True)
+        self.drop = nn.Dropout(p=dropout_p, inplace=True)
         self.linear = nn.Linear(c_, c2)  # to x(b,c2)
 
     def forward(self, x):

Addressing this issue #10804 

## 🛠️ PR Summary

<sub>Made with ❤️ by [Ultralytics Actions](https://github.com/ultralytics/actions)<sub>

### 🌟 Summary
Enhancement of the YOLOv5 classification head with customizable dropout.

### 📊 Key Changes
- Added a new parameter `dropout_p` to the `Classify` class initializer to specify dropout probability.
- Modified the `Dropout` layer to use the new `dropout_p` argument instead of a fixed value.

### 🎯 Purpose & Impact
- **Flexibility**: This change allows developers to customize the dropout rate, offering more control over model regularization.
- **Model Performance**: With adjustable dropout, users can potentially improve model generalization and reduce overfitting, leading to better performance on diverse datasets. 🌐📈
- **Usability**: It simplifies experimenting with different dropout rates without altering the codebase, enhancing user experience and expediting model tuning. ⚙️💡