yolov5 c3ghost代码
时间: 2023-10-12 22:06:23 浏览: 173
根据提供的引用内容,可以得知yolov5 c3ghost的代码如下所示:
```python
class C3Ghost(nn.Module):
def __init__(self, c1, c2, n=1, s=1, norm_layer=nn.BatchNorm2d, act_layer=nn.ReLU):
super(C3Ghost, self).__init__()
c_ = int(c2 * 0.5) # hidden channels
self.cv1 = Conv(c1, c_, 1, 1, norm_layer=norm_layer, act_layer=act_layer)
self.cv2 = Conv(c_, c1, 1, 1, norm_layer=norm_layer, act_layer=act_layer)
self.cv3 = Conv(c_, c_, 3, s, norm_layer=norm_layer, act_layer=act_layer)
self.cv4 = Conv(2 * c_, c2, 1, 1, norm_layer=norm_layer, act_layer=act_layer)
self.m = nn.Sequential(*<span class="em">1</span><span class="em">2</span><span class="em">3</span>
#### 引用[.reference_title]
- *1* *2* *3* [2021SC@SDUSC山东大学软件学院软件工程应用与实践--YOLOV5代码分析(十六)yolo.py-1](https://blog.csdn.net/xjunjin/article/details/121719686)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v93^chatsearchT3_1"}}] [.reference_item style="max-width: 100%"]
[ .reference_list ]
阅读全文