pub struct PathExt<'a> { /* private fields */ }
Implementations§
Source§impl<'a> PathExt<'a>
impl<'a> PathExt<'a>
Sourcepub fn ones(&self, name: &str, dims: &[i64]) -> Tensor
pub fn ones(&self, name: &str, dims: &[i64]) -> Tensor
Create a tensor variable initialized with ones.
Sourcepub fn var(
&self,
name: &str,
dims: &[i64],
init: Init,
) -> Result<Tensor, TchError>
pub fn var( &self, name: &str, dims: &[i64], init: Init, ) -> Result<Tensor, TchError>
Create a tensor variable initialized with the given initializer.
Trait Implementations§
Auto Trait Implementations§
impl<'a> Freeze for PathExt<'a>
impl<'a> !RefUnwindSafe for PathExt<'a>
impl<'a> !Send for PathExt<'a>
impl<'a> !Sync for PathExt<'a>
impl<'a> Unpin for PathExt<'a>
impl<'a> !UnwindSafe for PathExt<'a>
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
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more