pub struct Input { /* private fields */ }Expand description
A decorated Tensor passed to TensorBuilder::set_inputs.
Use new to create an immutable input, or new_mut to create a modifiable one.
See also TensorBuilder.
Implementations§
Source§impl<'graph> Input
impl<'graph> Input
Sourcepub fn new<F: Float>(val: &Tensor<'graph, F>) -> Input
pub fn new<F: Float>(val: &Tensor<'graph, F>) -> Input
Instantiates a new immutable Input object.
Run-time value of val is passed as an ndarray::ArrayView in Op::compute.
Sourcepub fn new_mut<F: Float>(val: &Tensor<'graph, F>) -> Input
pub fn new_mut<F: Float>(val: &Tensor<'graph, F>) -> Input
Instantiates a new mutable Input object.
Run-time value of val is passed as an ArrayViewMut in Op::compute.
pub fn as_tensor<F: Float>(&self, graph: &'graph Graph<F>) -> Tensor<'graph, F>
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Input
impl RefUnwindSafe for Input
impl Send for Input
impl Sync for Input
impl Unpin for Input
impl UnwindSafe for Input
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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