SparseTensorProto

onnx.onnx.SparseTensorProto
See theSparseTensorProto companion object
final case class SparseTensorProto(values: Option[TensorProto], indices: Option[TensorProto], dims: Seq[Long], unknownFields: UnknownFieldSet) extends GeneratedMessage, Updatable[SparseTensorProto]

A serialized sparse-tensor value

Value parameters

dims

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

indices

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]

values

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. values must have a non-empty name present which serves as a name for SparseTensorProto when used in sparse_initializer list.

Attributes

Companion
object
Graph
Supertypes
trait Updatable[SparseTensorProto]
trait GeneratedMessage
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all

Members list

Value members

Concrete methods

def addAllDims(`__vs`: Iterable[Long]): SparseTensorProto
def addDims(`__vs`: Long*): SparseTensorProto
def getField(`__field`: FieldDescriptor): PValue
def getFieldByNumber(`__fieldNumber`: Int): Any
override def serializedSize: Int

Attributes

Definition Classes
GeneratedMessage
def toProtoString: String

Returns a human-readable ASCII format representation of this message.

Returns a human-readable ASCII format representation of this message.

The original message can be decoded from this format by using fromAscii on the companion object.

Attributes

Returns

human-readable representation of this message.

def withDims(`__v`: Seq[Long]): SparseTensorProto
def withUnknownFields(`__v`: UnknownFieldSet): SparseTensorProto
def writeTo(`_output__`: CodedOutputStream): Unit

Serializes the message into the given coded output stream

Serializes the message into the given coded output stream

Attributes

Inherited methods

def productElementNames: Iterator[String]

Attributes

Inherited from:
Product
def productIterator: Iterator[Any]

Attributes

Inherited from:
Product
final def toByteArray: Array[Byte]

Serializes the message and returns a byte array containing its raw bytes

Serializes the message and returns a byte array containing its raw bytes

Attributes

Inherited from:
GeneratedMessage
final def toByteString: ByteString

Serializes the message and returns a ByteString containing its raw bytes

Serializes the message and returns a ByteString containing its raw bytes

Attributes

Inherited from:
GeneratedMessage
final def toPMessage: PMessage

Attributes

Inherited from:
GeneratedMessage

Attributes

Inherited from:
Updatable
final def writeDelimitedTo(output: OutputStream): Unit

Attributes

Inherited from:
GeneratedMessage
final def writeTo(output: OutputStream): Unit

Serializes the message into the given output stream

Serializes the message into the given output stream

Attributes

Inherited from:
GeneratedMessage