pub struct TensorInspection {
pub dtype: DType,
pub shape: Vec<usize>,
pub strides: Vec<isize>,
pub logical_elements: usize,
pub logical_bytes: usize,
pub retained_bytes: usize,
pub sampled_values: usize,
pub extrema_complete: bool,
pub preview: Vec<Scalar>,
pub minimum: Option<Scalar>,
pub maximum: Option<Scalar>,
pub statistics: TensorStatistics,
}Expand description
A bounded inspection of a tensor’s logical values and retained storage.
minimum, maximum, and preview retain their exact declared scalar
representation. Extrema cover the whole tensor when
sampled_values == logical_elements; otherwise they describe the deterministic
sample set. Preview values always show the exact leading logical elements. Approximate statistics
use the same sample set and state explicitly when binary64 cannot represent it.
Fields§
§dtype: DTypeDeclared element representation.
shape: Vec<usize>Logical dimensions in axis order.
strides: Vec<isize>Logical element strides in axis order; negative strides identify reverse views.
logical_elements: usizeNumber of logical elements in the tensor view.
logical_bytes: usizeBytes occupied by the logical elements if materialized contiguously.
retained_bytes: usizeBytes retained by the shared packed backing allocation.
sampled_values: usizeNumber of logical values actually read for this inspection.
extrema_complete: boolWhether every logical value was read, making extrema exact for the tensor.
preview: Vec<Scalar>First logical values, up to MAX_INSPECTION_PREVIEW and the sample limit.
minimum: Option<Scalar>Exact scalar minimum over all logical values or the deterministic sample set.
maximum: Option<Scalar>Exact scalar maximum over all logical values or the deterministic sample set.
statistics: TensorStatisticsFinite binary64 analysis of the deterministic sample set.
Trait Implementations§
Source§impl Clone for TensorInspection
impl Clone for TensorInspection
Source§fn clone(&self) -> TensorInspection
fn clone(&self) -> TensorInspection
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for TensorInspection
impl Debug for TensorInspection
Source§impl<'de> Deserialize<'de> for TensorInspection
impl<'de> Deserialize<'de> for TensorInspection
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Source§impl PartialEq for TensorInspection
impl PartialEq for TensorInspection
Source§fn eq(&self, other: &TensorInspection) -> bool
fn eq(&self, other: &TensorInspection) -> bool
self and other values to be equal, and is used by ==.