1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27
mod depth_wise; mod im2col; mod unary; pub use self::im2col::Im2Col; pub use self::unary::ConvUnary; #[derive(Debug, Copy, Clone, PartialEq, Hash)] pub enum KernelFormat { OIHW, HWIO, } impl Default for KernelFormat { fn default() -> KernelFormat { KernelFormat::OIHW } } impl KernelFormat { pub fn h_axis(&self) -> usize { match self { KernelFormat::OIHW => 2, KernelFormat::HWIO => 0, } } }