dfdx 0.9.0

Ergonomic auto differentiation in Rust, with pytorch like apis.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
use super::*;
use crate::devices::{Cpu, HasDevice};

macro_rules! tensor_impl {
    ($typename:ident, [$($Vs:tt),*]) => {
impl<$(const $Vs: usize, )* H> HasDevice for $typename<$($Vs, )* H> {
    type Device = Cpu;
}
    };
}

tensor_impl!(Tensor0D, []);
tensor_impl!(Tensor1D, [M]);
tensor_impl!(Tensor2D, [M, N]);
tensor_impl!(Tensor3D, [M, N, O]);
tensor_impl!(Tensor4D, [M, N, O, P]);