dfdx 0.13.0

Ergonomic auto differentiation in Rust, with pytorch like apis.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
use super::*;

/// Marker for shapes that can be converted using their concrete types.
pub trait RealizeShapeTo<Dst: Shape>: Shape {
    fn realized(&self) -> Option<Dst>;
}

impl<Src: Shape<Concrete = Dst::Concrete>, Dst: Shape> RealizeShapeTo<Dst> for Src {
    #[inline(always)]
    fn realized(&self) -> Option<Dst> {
        Dst::from_concrete(&self.concrete())
    }
}