pub struct TensorListMut<'t> { /* private fields */ }Expand description
A list of tensors returned by interpreter input queries.
This list is created from a &mut Session and therefore has exclusive access to the
tensors it describes, which is what allows it to hand out &mut TensorRefs.
It dereferences to TensorList for all the read-only operations.
Implementations§
Source§impl<'t> TensorListMut<'t>
impl<'t> TensorListMut<'t>
Sourcepub fn get_mut(&mut self, index: usize) -> Option<TensorInfoMut<'t, '_>>
pub fn get_mut(&mut self, index: usize) -> Option<TensorInfoMut<'t, '_>>
Get a mutable reference to the tensor at the given index
Sourcepub fn iter_mut<'tl>(&'tl mut self) -> TensorListIterMut<'t, 'tl> ⓘ
pub fn iter_mut<'tl>(&'tl mut self) -> TensorListIterMut<'t, 'tl> ⓘ
Get a mutable iterator over the tensor list
Methods from Deref<Target = TensorList<'t>>§
Trait Implementations§
Source§impl Debug for TensorListMut<'_>
impl Debug for TensorListMut<'_>
Source§impl<'t> Deref for TensorListMut<'t>
impl<'t> Deref for TensorListMut<'t>
Source§impl<'t, 'tl> IntoIterator for &'tl TensorListMut<'t>
impl<'t, 'tl> IntoIterator for &'tl TensorListMut<'t>
Source§impl<'t, 'tl> IntoIterator for &'tl mut TensorListMut<'t>
impl<'t, 'tl> IntoIterator for &'tl mut TensorListMut<'t>
Auto Trait Implementations§
impl<'t> Freeze for TensorListMut<'t>
impl<'t> RefUnwindSafe for TensorListMut<'t>
impl<'t> !Send for TensorListMut<'t>
impl<'t> !Sync for TensorListMut<'t>
impl<'t> Unpin for TensorListMut<'t>
impl<'t> UnsafeUnpin for TensorListMut<'t>
impl<'t> UnwindSafe for TensorListMut<'t>
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