-
Notifications
You must be signed in to change notification settings - Fork 343
/
lib.rs
32 lines (27 loc) · 863 Bytes
/
lib.rs
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
#[macro_use]
extern crate lazy_static;
pub mod data;
mod error;
pub use error::TchError;
pub type Result<T> = std::result::Result<T, error::TchError>;
pub(crate) mod wrappers;
pub use wrappers::device::{Cuda, Device};
pub use wrappers::jit::{self, CModule, IValue, TrainableCModule};
pub use wrappers::kind::{self, Kind};
pub use wrappers::layout::Layout;
pub use wrappers::optimizer::COptimizer;
#[cfg(feature = "python-extension")]
pub use wrappers::python;
pub use wrappers::scalar::Scalar;
pub use wrappers::utils;
pub use wrappers::{
get_num_interop_threads, get_num_threads, manual_seed, set_num_interop_threads,
set_num_threads, QEngine,
};
mod tensor;
pub use tensor::{
autocast, display, index, no_grad, no_grad_guard, with_grad, IndexOp, NewAxis, NoGradGuard,
Reduction, Shape, Tensor, TensorIndexer,
};
pub mod nn;
pub mod vision;