incin-core 0.1.0

Core tensor operations and static shape checking for incin
Documentation
1
2
3
4
5
6
7
8
9
use typenum::{Diff, Prod, Quot, Sum, U1, U2};

/// Flatten two adjacent dimensions into one.
pub type FlatDim<A, B> = Prod<A, B>;

/// Convolution spatial output dimension on stable Rust.
/// Computed as: (InSize + 2 * Padding - KernelSize) / Stride + 1
pub type ConvOutDim<InSize, KernelSize, Stride, Padding> =
    Sum<Quot<Diff<Sum<InSize, Prod<U2, Padding>>, KernelSize>, Stride>, U1>;