Beispiel #1
0
 def __init__(self, c1, c2, k=1, s=1, g=1, act=True):  # ch_in, ch_out, kernel, stride, groups
     super(GhostConv, self).__init__()
     c_ = c2 // 2  # hidden channels
     self.cv1 = Conv(c1, c_, k, s, None, g, act)
     self.cv2 = Conv(c_, c_, 5, 1, None, c_, act)
Beispiel #2
0
 def __init__(self, c1, c2, n=1, shortcut=True, g=1, e=0.5):  # ch_in, ch_out, number, shortcut, groups, expansion
     super(VoVCSP, self).__init__()
     c_ = int(c2)  # hidden channels
     self.cv1 = Conv(c1 // 2, c_ // 2, 3, 1)
     self.cv2 = Conv(c_ // 2, c_ // 2, 3, 1)
     self.cv3 = Conv(c_, c2, 1, 1)