Concise `TransformerBlock()`
diff --git a/models/common.py b/models/common.py
index 4211db406c3..96d63a07a1b 100644
--- a/models/common.py
+++ b/models/common.py
@@ -77,18 +77,8 @@ def forward(self, x):
         if self.conv is not None:
             x = self.conv(x)
         b, _, w, h = x.shape
-        p = x.flatten(2)
-        p = p.unsqueeze(0)
-        p = p.transpose(0, 3)
-        p = p.squeeze(3)
-        e = self.linear(p)
-        x = p + e
-
-        x = self.tr(x)
-        x = x.unsqueeze(3)
-        x = x.transpose(0, 3)
-        x = x.reshape(b, self.c2, w, h)
-        return x
+        p = x.flatten(2).unsqueeze(0).transpose(0, 3).squeeze(3)
+        return self.tr(p + self.linear(p)).unsqueeze(3).transpose(0, 3).reshape(b, self.c2, w, h)
 
 
 class Bottleneck(nn.Module):



## 🛠️ PR Summary

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

### 🌟 Summary
Simplified tensor operations in forward method of a model component.

### 📊 Key Changes
- Streamlined the forward pass code by chaining tensor operations.
- Removed intermediate variables and redundant reshaping steps.

### 🎯 Purpose & Impact
- ✨ **Clarity**: The PR makes the code more readable and concise, improving maintainability.
- ⚡ **Efficiency**: Chaining operations may offer slight runtime performance improvements.
- 🧠 **Understandability**: Reduces complexity for developers trying to understand or modify the forward pass.