Struct burn::backend::ndarray::NdArrayTensor
pub struct NdArrayTensor<E> {
pub array: ArrayBase<OwnedArcRepr<E>, Dim<IxDynImpl>>,
}
Expand description
Tensor primitive used by the ndarray backend.
Fields§
§array: ArrayBase<OwnedArcRepr<E>, Dim<IxDynImpl>>
Dynamic array that contains the data of type E.
Implementations§
§impl<E> NdArrayTensor<E>
impl<E> NdArrayTensor<E>
pub fn new(
array: ArrayBase<OwnedArcRepr<E>, Dim<IxDynImpl>>,
) -> NdArrayTensor<E>
pub fn new( array: ArrayBase<OwnedArcRepr<E>, Dim<IxDynImpl>>, ) -> NdArrayTensor<E>
Constructs a new NdArrayTensor
.
§impl<E> NdArrayTensor<E>where
E: Element,
impl<E> NdArrayTensor<E>where
E: Element,
pub fn from_data(data: TensorData) -> NdArrayTensor<E>
pub fn from_data(data: TensorData) -> NdArrayTensor<E>
Create a new ndarray tensor from data.
Trait Implementations§
§impl<E> Clone for NdArrayTensor<E>where
E: Clone,
impl<E> Clone for NdArrayTensor<E>where
E: Clone,
§fn clone(&self) -> NdArrayTensor<E>
fn clone(&self) -> NdArrayTensor<E>
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreAuto Trait Implementations§
impl<E> Freeze for NdArrayTensor<E>
impl<E> RefUnwindSafe for NdArrayTensor<E>where
E: RefUnwindSafe,
impl<E> Send for NdArrayTensor<E>
impl<E> Sync for NdArrayTensor<E>
impl<E> Unpin for NdArrayTensor<E>
impl<E> UnwindSafe for NdArrayTensor<E>where
E: RefUnwindSafe,
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§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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