pub struct TensorMut<'a> { /* private fields */ }Expand description
Read-write borrow of a tensor owned by a crate::Interpreter.
Like Tensor but additionally exposes TensorMut::data_mut for
filling input buffers in place.
Implementations§
Source§impl<'a> TensorMut<'a>
impl<'a> TensorMut<'a>
Sourcepub fn dtype(&self) -> TfLiteType
pub fn dtype(&self) -> TfLiteType
Element type of the tensor.
Sourcepub fn quantization(&self) -> TfLiteQuantizationParams
pub fn quantization(&self) -> TfLiteQuantizationParams
Affine quantization parameters (scale, zero_point).
Sourcepub fn data_mut(&mut self) -> Result<&mut [u8]>
pub fn data_mut(&mut self) -> Result<&mut [u8]>
Mutable byte view of the tensor’s data buffer.
Errors with Error::NullData if the C API reports a NULL data
pointer (which can happen if the tensor has not been allocated yet).
Auto Trait Implementations§
impl<'a> !Send for TensorMut<'a>
impl<'a> !Sync for TensorMut<'a>
impl<'a> !UnwindSafe for TensorMut<'a>
impl<'a> Freeze for TensorMut<'a>
impl<'a> RefUnwindSafe for TensorMut<'a>
impl<'a> Unpin for TensorMut<'a>
impl<'a> UnsafeUnpin for TensorMut<'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