final case class TensorProto(dims: Seq[Long] = _root_.scala.collection.Seq.empty, dataType: DataType = ..., segment: Option[Segment] = None, floatData: Seq[Float] = _root_.scala.collection.Seq.empty, int32Data: Seq[Int] = _root_.scala.collection.Seq.empty, stringData: Seq[ByteString] = _root_.scala.collection.Seq.empty, int64Data: Seq[Long] = _root_.scala.collection.Seq.empty, name: String = "", docString: String = "", rawData: ByteString = ..., doubleData: Seq[Double] = _root_.scala.collection.Seq.empty, uint64Data: Seq[Long] = _root_.scala.collection.Seq.empty) extends GeneratedMessage with Message[TensorProto] with Updatable[TensorProto] with Product with Serializable
Tensors
A serialized tensor value.
- dims
The shape of the tensor.
- dataType
The data type of the tensor.
- floatData
For float and complex64 values Complex64 tensors are encoded as a single array of floats, with the real components appearing in odd numbered positions, and the corresponding imaginary component apparing in the subsequent even numbered position. (e.g., [1.0 + 2.0i, 3.0 + 4.0i] is encoded as [1.0, 2.0 ,3.0 ,4.0] When this field is present, the data_type field MUST be FLOAT or COMPLEX64.
- int32Data
For int32, uint8, int8, uint16, int16, bool, and float16 values float16 values must be bit-wise converted to an uint16_t prior to writing to the buffer. When this field is present, the data_type field MUST be INT32, INT16, INT8, UINT16, INT8, BOOL, or FLOAT32
- stringData
For strings. Each element of string_data is a UTF-8 encoded Unicode string. No trailing null, no leading BOM. The protobuf "string" scalar type is not used to match ML community conventions. When this field is present, the data_type field MUST be STRING
- int64Data
For int64. When this field is present, the data_type field MUST be INT64
- name
Optionally, a name for the tensor. namespace Value
- docString
A human-readable documentation for this tensor. Markdown is allowed.
- rawData
Serializations can either use one of the fields above, or use this raw bytes field. The only exception is the string case, where one is required to store the content in the repeated bytes string_data field. When this raw_data field is used to store tensor value, elements MUST be stored in as fixed-width, little-endian order. Floating-point data types MUST be stored in IEEE 754 format. Complex64 elements must be written as two consecutive FLOAT values, real component first. Complex128 elements must be written as two consecutive DOUBLE values, real component first. Boolean type MUST be written one byte per tensor element (00000001 for true, 00000000 for false). Note: the advantage of specific field rather than the raw_data field is that in some cases (e.g. int data), protobuf does a better packing via variable length storage, and may lead to smaller binary footprint. When this field is present, the data_type field MUST NOT be STRING or UNDEFINED
- doubleData
For double Complex64 tensors are encoded as a single array of doubles, with the real components appearing in odd numbered positions, and the corresponding imaginary component apparing in the subsequent even numbered position. (e.g., [1.0 + 2.0i, 3.0 + 4.0i] is encoded as [1.0, 2.0 ,3.0 ,4.0] When this field is present, the data_type field MUST be DOUBLE or COMPLEX128
- uint64Data
For uint64 and uint32 values When this field is present, the data_type field MUST be UINT32 or UINT64
- Annotations
- @SerialVersionUID()
- Alphabetic
- By Inheritance
- TensorProto
- Product
- Equals
- Updatable
- Message
- GeneratedMessage
- Serializable
- Serializable
- AnyRef
- Any
- Hide All
- Show All
- Public
- All
Instance Constructors
-
new
TensorProto(dims: Seq[Long] = _root_.scala.collection.Seq.empty, dataType: DataType = ..., segment: Option[Segment] = None, floatData: Seq[Float] = _root_.scala.collection.Seq.empty, int32Data: Seq[Int] = _root_.scala.collection.Seq.empty, stringData: Seq[ByteString] = _root_.scala.collection.Seq.empty, int64Data: Seq[Long] = _root_.scala.collection.Seq.empty, name: String = "", docString: String = "", rawData: ByteString = ..., doubleData: Seq[Double] = _root_.scala.collection.Seq.empty, uint64Data: Seq[Long] = _root_.scala.collection.Seq.empty)
- dims
The shape of the tensor.
- dataType
The data type of the tensor.
- floatData
For float and complex64 values Complex64 tensors are encoded as a single array of floats, with the real components appearing in odd numbered positions, and the corresponding imaginary component apparing in the subsequent even numbered position. (e.g., [1.0 + 2.0i, 3.0 + 4.0i] is encoded as [1.0, 2.0 ,3.0 ,4.0] When this field is present, the data_type field MUST be FLOAT or COMPLEX64.
- int32Data
For int32, uint8, int8, uint16, int16, bool, and float16 values float16 values must be bit-wise converted to an uint16_t prior to writing to the buffer. When this field is present, the data_type field MUST be INT32, INT16, INT8, UINT16, INT8, BOOL, or FLOAT32
- stringData
For strings. Each element of string_data is a UTF-8 encoded Unicode string. No trailing null, no leading BOM. The protobuf "string" scalar type is not used to match ML community conventions. When this field is present, the data_type field MUST be STRING
- int64Data
For int64. When this field is present, the data_type field MUST be INT64
- name
Optionally, a name for the tensor. namespace Value
- docString
A human-readable documentation for this tensor. Markdown is allowed.
- rawData
Serializations can either use one of the fields above, or use this raw bytes field. The only exception is the string case, where one is required to store the content in the repeated bytes string_data field. When this raw_data field is used to store tensor value, elements MUST be stored in as fixed-width, little-endian order. Floating-point data types MUST be stored in IEEE 754 format. Complex64 elements must be written as two consecutive FLOAT values, real component first. Complex128 elements must be written as two consecutive DOUBLE values, real component first. Boolean type MUST be written one byte per tensor element (00000001 for true, 00000000 for false). Note: the advantage of specific field rather than the raw_data field is that in some cases (e.g. int data), protobuf does a better packing via variable length storage, and may lead to smaller binary footprint. When this field is present, the data_type field MUST NOT be STRING or UNDEFINED
- doubleData
For double Complex64 tensors are encoded as a single array of doubles, with the real components appearing in odd numbered positions, and the corresponding imaginary component apparing in the subsequent even numbered position. (e.g., [1.0 + 2.0i, 3.0 + 4.0i] is encoded as [1.0, 2.0 ,3.0 ,4.0] When this field is present, the data_type field MUST be DOUBLE or COMPLEX128
- uint64Data
For uint64 and uint32 values When this field is present, the data_type field MUST be UINT32 or UINT64
Value Members
-
final
def
!=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
##(): Int
- Definition Classes
- AnyRef → Any
-
final
def
==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- def addAllDims(__vs: TraversableOnce[Long]): TensorProto
- def addAllDoubleData(__vs: TraversableOnce[Double]): TensorProto
- def addAllFloatData(__vs: TraversableOnce[Float]): TensorProto
- def addAllInt32Data(__vs: TraversableOnce[Int]): TensorProto
- def addAllInt64Data(__vs: TraversableOnce[Long]): TensorProto
- def addAllStringData(__vs: TraversableOnce[ByteString]): TensorProto
- def addAllUint64Data(__vs: TraversableOnce[Long]): TensorProto
- def addDims(__vs: Long*): TensorProto
- def addDoubleData(__vs: Double*): TensorProto
- def addFloatData(__vs: Float*): TensorProto
- def addInt32Data(__vs: Int*): TensorProto
- def addInt64Data(__vs: Long*): TensorProto
- def addStringData(__vs: ByteString*): TensorProto
- def addUint64Data(__vs: Long*): TensorProto
-
final
def
asInstanceOf[T0]: T0
- Definition Classes
- Any
- def clearDims: TensorProto
- def clearDoubleData: TensorProto
- def clearFloatData: TensorProto
- def clearInt32Data: TensorProto
- def clearInt64Data: TensorProto
- def clearSegment: TensorProto
- def clearStringData: TensorProto
- def clearUint64Data: TensorProto
-
def
clone(): AnyRef
- Attributes
- protected[java.lang]
- Definition Classes
- AnyRef
- Annotations
- @native() @throws( ... )
-
def
companion: TensorProto.type
- Definition Classes
- TensorProto → GeneratedMessage
- val dataType: DataType
- val dims: Seq[Long]
- val docString: String
- val doubleData: Seq[Double]
-
final
def
eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
def
finalize(): Unit
- Attributes
- protected[java.lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( classOf[java.lang.Throwable] )
- val floatData: Seq[Float]
-
final
def
getClass(): Class[_]
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
-
def
getField(__field: FieldDescriptor): PValue
- Definition Classes
- TensorProto → GeneratedMessage
-
def
getFieldByNumber(__fieldNumber: Int): Any
- Definition Classes
- TensorProto → GeneratedMessage
- def getSegment: Segment
- val int32Data: Seq[Int]
- val int64Data: Seq[Long]
-
final
def
isInstanceOf[T0]: Boolean
- Definition Classes
- Any
-
def
mergeFrom(_input__: CodedInputStream): TensorProto
- Definition Classes
- TensorProto → Message
- val name: String
-
final
def
ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
final
def
notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
-
final
def
notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
- val rawData: ByteString
- val segment: Option[Segment]
-
final
def
serializedSize: Int
- Definition Classes
- TensorProto → GeneratedMessage
- val stringData: Seq[ByteString]
-
final
def
synchronized[T0](arg0: ⇒ T0): T0
- Definition Classes
- AnyRef
-
def
toByteArray: Array[Byte]
- Definition Classes
- GeneratedMessage
-
def
toByteString: ByteString
- Definition Classes
- GeneratedMessage
-
def
toPMessage: PMessage
- Definition Classes
- GeneratedMessage
-
def
toProtoString: String
- Definition Classes
- TensorProto → GeneratedMessage
- val uint64Data: Seq[Long]
-
def
update(ms: (Lens[TensorProto, TensorProto]) ⇒ Mutation[TensorProto]*): TensorProto
- Definition Classes
- Updatable
-
final
def
wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @native() @throws( ... )
- def withDataType(__v: DataType): TensorProto
- def withDims(__v: Seq[Long]): TensorProto
- def withDocString(__v: String): TensorProto
- def withDoubleData(__v: Seq[Double]): TensorProto
- def withFloatData(__v: Seq[Float]): TensorProto
- def withInt32Data(__v: Seq[Int]): TensorProto
- def withInt64Data(__v: Seq[Long]): TensorProto
- def withName(__v: String): TensorProto
- def withRawData(__v: ByteString): TensorProto
- def withSegment(__v: Segment): TensorProto
- def withStringData(__v: Seq[ByteString]): TensorProto
- def withUint64Data(__v: Seq[Long]): TensorProto
-
def
writeDelimitedTo(output: OutputStream): Unit
- Definition Classes
- GeneratedMessage
-
def
writeTo(_output__: CodedOutputStream): Unit
- Definition Classes
- TensorProto → GeneratedMessage
-
def
writeTo(output: OutputStream): Unit
- Definition Classes
- GeneratedMessage
Deprecated Value Members
-
def
getAllFields: Map[FieldDescriptor, Any]
- Definition Classes
- GeneratedMessage
- Annotations
- @deprecated
- Deprecated
(Since version 0.6.0) Use toPMessage
-
def
getField(field: FieldDescriptor): Any
- Definition Classes
- GeneratedMessage
- Annotations
- @deprecated
- Deprecated
(Since version 0.6.0) Use getField that accepts a ScalaPB descriptor and returns PValue