[][src]Struct onnx_pb::SparseTensorProto

pub struct SparseTensorProto {
    pub values: Option<TensorProto>,
    pub indices: Option<TensorProto>,
    pub dims: Vec<i64>,
}

A serialized sparse-tensor value

Fields

values: Option<TensorProto>

The sequence of non-default values are encoded as a tensor of shape [NNZ]. The default-value is zero for numeric tensors, and empty-string for string tensors.

indices: Option<TensorProto>

The indices of the non-default values, which may be stored in one of two formats. (a) Indices can be a tensor of shape [NNZ, rank] with the [i,j]-th value corresponding to the j-th index of the i-th value (in the values tensor). (b) Indices can be a tensor of shape [NNZ], in which case the i-th value must be the linearized-index of the i-th value (in the values tensor). The linearized-index can be converted into an index tuple (k_1,...,k_rank) using the shape provided below. The indices must appear in ascending order without duplication. In the first format, the ordering is lexicographic-ordering: e.g., index-value [1,4] must appear before [2,1]

dims: Vec<i64>

The shape of the underlying dense-tensor: [dim_1, dim_2, ... dim_rank]

Trait Implementations

impl Clone for SparseTensorProto[src]

impl Debug for SparseTensorProto[src]

impl Default for SparseTensorProto[src]

impl Message for SparseTensorProto[src]

impl PartialEq<SparseTensorProto> for SparseTensorProto[src]

impl StructuralPartialEq for SparseTensorProto[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.