gtensor 1.0.0

Reverse-mode autodifferentiation of computational graphs with tensors and more for machine learning.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18

use crate::Tensor;
use crate::tensor::slice::TensorSlice;

pub fn mse(
    t: TensorSlice,
    p: TensorSlice,
    e: &mut Tensor,
    g: &mut Tensor,
) {
    bmls::mse(
        t.data,
        p.data,
        &mut e.data,
        &mut g.data,
        t.shape.as_array2(),
    ).unwrap()
}