pub struct TensorLoader { /* private fields */ }Implementations§
Source§impl TensorLoader
impl TensorLoader
pub fn new<P: Into<PathBuf>>(file_path: P) -> Self
pub fn push(self, name: &str, slices: &[(i64, i64, i64)]) -> Self
pub fn load<B>(self) -> Result<HashMap<String, B>>where
B: CPUTensorCreator,
<B as CPUTensorCreator>::Output: Into<B> + TensorInfo<<B as CPUTensorCreator>::Meta>,
<B as CPUTensorCreator>::Meta: CommonBounds + AnyBitPattern,
pub fn load_all<B>(self) -> Result<HashMap<String, B>>where
B: CPUTensorCreator,
<B as CPUTensorCreator>::Output: Into<B> + TensorInfo<<B as CPUTensorCreator>::Meta>,
<B as CPUTensorCreator>::Meta: CommonBounds + AnyBitPattern,
Auto Trait Implementations§
impl Freeze for TensorLoader
impl RefUnwindSafe for TensorLoader
impl Send for TensorLoader
impl Sync for TensorLoader
impl Unpin for TensorLoader
impl UnsafeUnpin for TensorLoader
impl UnwindSafe for TensorLoader
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more