Skip to main content

c3k2

Function c3k2 

Source
pub fn c3k2<D: Float + 'static>(
    c_in: usize,
    c_out: usize,
    n: usize,
    c3k: bool,
    shortcut: bool,
    e: f32,
) -> impl Fn(SymTensor) -> SymTensor
Expand description

C3k2: the primary feature-extraction block in YOLO11/26.

Matches ultralytics.nn.modules.block.C3k2 (which inherits from C2f). Forward: h = cv1(x) // [N, 2*c, H, W] [y0, y1] = h.chunk(2, dim=1) // each [N, c, H, W] parts = [y0, y1] last = y1 for each bottleneck b: last = b(last); parts.append(last) return cv2(cat(parts)) // [(2+n)*c → c_out]