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
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
/*
    Appellation: acme-tensor <library>
    Contrib: FL03 <jo3mccain@icloud.com>
*/
//! # Tensor
//!
//! This library implements a tensor data structure with support for automatic differentiation.
//!
#[cfg(not(feature = "std"))]
extern crate alloc;

extern crate acme_core as acme;

#[doc(inline)]
pub use self::{tensor::*, utils::*};

#[macro_use]
pub(crate) mod seal;
pub(crate) mod tensor;
#[macro_use]
pub(crate) mod utils;

pub mod actions;
pub mod backend;
pub mod data;
pub mod error;
#[cfg(feature = "io")]
pub mod io;
pub mod linalg;
pub mod ops;
pub mod shape;
pub mod specs;
pub mod stats;
pub mod types;

mod impls {
    mod ops {
        mod binary;
        mod unary;
    }
    mod create;
    mod grad;
    mod iter;
    mod linalg;
    mod num;
    mod reshape;
}

pub type Tensor<T = f64> = tensor::TensorBase<T>;

pub mod prelude {
    #[doc(inline)]
    pub use crate::actions::prelude::*;
    #[doc(inline)]
    pub use crate::data::prelude::*;
    #[doc(inline)]
    pub use crate::error::*;
    #[doc(inline)]
    pub use crate::linalg::prelude::*;
    #[doc(inline)]
    pub use crate::ops::*;
    #[doc(inline)]
    pub use crate::shape::prelude::*;
    #[doc(inline)]
    pub use crate::specs::prelude::*;
    #[doc(inline)]
    pub use crate::types::prelude::*;
    pub use crate::utils::*;
    #[doc(inline)]
    pub use crate::Tensor;
}