final case class TensorProto(dims: Seq[Long] = _root_.scala.Seq.empty, dataType: Option[Int] = _root_.scala.None, segment: Option[Segment] = _root_.scala.None, floatData: Seq[Float] = _root_.scala.Seq.empty, int32Data: Seq[Int] = _root_.scala.Seq.empty, stringData: Seq[ByteString] = _root_.scala.Seq.empty, int64Data: Seq[Long] = _root_.scala.Seq.empty, name: Option[String] = _root_.scala.None, docString: Option[String] = _root_.scala.None, rawData: Option[ByteString] = _root_.scala.None, externalData: Seq[StringStringEntryProto] = _root_.scala.Seq.empty, dataLocation: Option[DataLocation] = _root_.scala.None, doubleData: Seq[Double] = _root_.scala.Seq.empty, uint64Data: Seq[Long] = _root_.scala.Seq.empty, unknownFields: UnknownFieldSet = _root_.scalapb.UnknownFieldSet.empty) extends GeneratedMessage 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. This field MUST have a valid TensorProto.DataType value

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 appearing 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, UINT8, BOOL, or FLOAT16

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

externalData

Data can be stored inside the protobuf file using type-specific fields or raw_data. Alternatively, raw bytes data can be stored in an external file, using the external_data field. external_data stores key-value pairs describing data location. Recognized keys are:

  • "location" (required) - POSIX filesystem path relative to the directory where the ONNX protobuf model was stored
  • "offset" (optional) - position of byte at which stored data begins. Integer stored as string. Offset values SHOULD be multiples 4096 (page size) to enable mmap support.
  • "length" (optional) - number of bytes containing data. Integer stored as string.
  • "checksum" (optional) - SHA1 digest of file specified in under 'location' key.
dataLocation

If value not set, data is stored in raw_data (if set) otherwise in type-specified field.

doubleData

For double Complex128 tensors are encoded as a single array of doubles, with the real components appearing in odd numbered positions, and the corresponding imaginary component appearing 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()
Linear Supertypes
Updatable[TensorProto], GeneratedMessage, Serializable, Product, Equals, AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. TensorProto
  2. Updatable
  3. GeneratedMessage
  4. Serializable
  5. Product
  6. Equals
  7. AnyRef
  8. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. Protected

Instance Constructors

  1. new TensorProto(dims: Seq[Long] = _root_.scala.Seq.empty, dataType: Option[Int] = _root_.scala.None, segment: Option[Segment] = _root_.scala.None, floatData: Seq[Float] = _root_.scala.Seq.empty, int32Data: Seq[Int] = _root_.scala.Seq.empty, stringData: Seq[ByteString] = _root_.scala.Seq.empty, int64Data: Seq[Long] = _root_.scala.Seq.empty, name: Option[String] = _root_.scala.None, docString: Option[String] = _root_.scala.None, rawData: Option[ByteString] = _root_.scala.None, externalData: Seq[StringStringEntryProto] = _root_.scala.Seq.empty, dataLocation: Option[DataLocation] = _root_.scala.None, doubleData: Seq[Double] = _root_.scala.Seq.empty, uint64Data: Seq[Long] = _root_.scala.Seq.empty, unknownFields: UnknownFieldSet = _root_.scalapb.UnknownFieldSet.empty)

    dims

    The shape of the tensor.

    dataType

    The data type of the tensor. This field MUST have a valid TensorProto.DataType value

    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 appearing 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, UINT8, BOOL, or FLOAT16

    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

    externalData

    Data can be stored inside the protobuf file using type-specific fields or raw_data. Alternatively, raw bytes data can be stored in an external file, using the external_data field. external_data stores key-value pairs describing data location. Recognized keys are:

    • "location" (required) - POSIX filesystem path relative to the directory where the ONNX protobuf model was stored
    • "offset" (optional) - position of byte at which stored data begins. Integer stored as string. Offset values SHOULD be multiples 4096 (page size) to enable mmap support.
    • "length" (optional) - number of bytes containing data. Integer stored as string.
    • "checksum" (optional) - SHA1 digest of file specified in under 'location' key.
    dataLocation

    If value not set, data is stored in raw_data (if set) otherwise in type-specified field.

    doubleData

    For double Complex128 tensors are encoded as a single array of doubles, with the real components appearing in odd numbered positions, and the corresponding imaginary component appearing 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

  1. final def !=(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  2. final def ##: Int
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  4. def addAllDims(__vs: Iterable[Long]): TensorProto
  5. def addAllDoubleData(__vs: Iterable[Double]): TensorProto
  6. def addAllExternalData(__vs: Iterable[StringStringEntryProto]): TensorProto
  7. def addAllFloatData(__vs: Iterable[Float]): TensorProto
  8. def addAllInt32Data(__vs: Iterable[Int]): TensorProto
  9. def addAllInt64Data(__vs: Iterable[Long]): TensorProto
  10. def addAllStringData(__vs: Iterable[ByteString]): TensorProto
  11. def addAllUint64Data(__vs: Iterable[Long]): TensorProto
  12. def addDims(__vs: Long*): TensorProto
  13. def addDoubleData(__vs: Double*): TensorProto
  14. def addExternalData(__vs: StringStringEntryProto*): TensorProto
  15. def addFloatData(__vs: Float*): TensorProto
  16. def addInt32Data(__vs: Int*): TensorProto
  17. def addInt64Data(__vs: Long*): TensorProto
  18. def addStringData(__vs: ByteString*): TensorProto
  19. def addUint64Data(__vs: Long*): TensorProto
  20. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  21. def clearDataLocation: TensorProto
  22. def clearDataType: TensorProto
  23. def clearDims: TensorProto
  24. def clearDocString: TensorProto
  25. def clearDoubleData: TensorProto
  26. def clearExternalData: TensorProto
  27. def clearFloatData: TensorProto
  28. def clearInt32Data: TensorProto
  29. def clearInt64Data: TensorProto
  30. def clearName: TensorProto
  31. def clearRawData: TensorProto
  32. def clearSegment: TensorProto
  33. def clearStringData: TensorProto
  34. def clearUint64Data: TensorProto
  35. def clone(): AnyRef
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.CloneNotSupportedException]) @IntrinsicCandidate() @native()
  36. def companion: TensorProto.type
    Definition Classes
    TensorProto → GeneratedMessage
  37. val dataLocation: Option[DataLocation]
  38. val dataType: Option[Int]
  39. val dims: Seq[Long]
  40. def discardUnknownFields: TensorProto
  41. val docString: Option[String]
  42. val doubleData: Seq[Double]
  43. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  44. val externalData: Seq[StringStringEntryProto]
  45. val floatData: Seq[Float]
  46. final def getClass(): Class[_ <: AnyRef]
    Definition Classes
    AnyRef → Any
    Annotations
    @IntrinsicCandidate() @native()
  47. def getDataLocation: DataLocation
  48. def getDataType: Int
  49. def getDocString: String
  50. def getField(__field: FieldDescriptor): PValue
    Definition Classes
    TensorProto → GeneratedMessage
  51. def getFieldByNumber(__fieldNumber: Int): Any
    Definition Classes
    TensorProto → GeneratedMessage
  52. def getName: String
  53. def getRawData: ByteString
  54. def getSegment: Segment
  55. val int32Data: Seq[Int]
  56. val int64Data: Seq[Long]
  57. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  58. val name: Option[String]
  59. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  60. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @IntrinsicCandidate() @native()
  61. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @IntrinsicCandidate() @native()
  62. def productElementNames: Iterator[String]
    Definition Classes
    Product
  63. val rawData: Option[ByteString]
  64. val segment: Option[Segment]
  65. def serializedSize: Int
    Definition Classes
    TensorProto → GeneratedMessage
  66. val stringData: Seq[ByteString]
  67. final def synchronized[T0](arg0: => T0): T0
    Definition Classes
    AnyRef
  68. final def toByteArray: Array[Byte]
    Definition Classes
    GeneratedMessage
  69. final def toByteString: ByteString
    Definition Classes
    GeneratedMessage
  70. final def toPMessage: PMessage
    Definition Classes
    GeneratedMessage
  71. def toProtoString: String
    Definition Classes
    TensorProto → GeneratedMessage
  72. val uint64Data: Seq[Long]
  73. val unknownFields: UnknownFieldSet
  74. def update(ms: (Lens[TensorProto, TensorProto]) => Mutation[TensorProto]*): TensorProto
    Definition Classes
    Updatable
  75. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  76. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException]) @native()
  77. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  78. def withDataLocation(__v: DataLocation): TensorProto
  79. def withDataType(__v: Int): TensorProto
  80. def withDims(__v: Seq[Long]): TensorProto
  81. def withDocString(__v: String): TensorProto
  82. def withDoubleData(__v: Seq[Double]): TensorProto
  83. def withExternalData(__v: Seq[StringStringEntryProto]): TensorProto
  84. def withFloatData(__v: Seq[Float]): TensorProto
  85. def withInt32Data(__v: Seq[Int]): TensorProto
  86. def withInt64Data(__v: Seq[Long]): TensorProto
  87. def withName(__v: String): TensorProto
  88. def withRawData(__v: ByteString): TensorProto
  89. def withSegment(__v: Segment): TensorProto
  90. def withStringData(__v: Seq[ByteString]): TensorProto
  91. def withUint64Data(__v: Seq[Long]): TensorProto
  92. def withUnknownFields(__v: UnknownFieldSet): TensorProto
  93. final def writeDelimitedTo(output: OutputStream): Unit
    Definition Classes
    GeneratedMessage
  94. def writeTo(_output__: CodedOutputStream): Unit
    Definition Classes
    TensorProto → GeneratedMessage
  95. final def writeTo(output: OutputStream): Unit
    Definition Classes
    GeneratedMessage

Deprecated Value Members

  1. def finalize(): Unit
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.Throwable]) @Deprecated
    Deprecated

    (Since version 9)

Inherited from Updatable[TensorProto]

Inherited from GeneratedMessage

Inherited from Serializable

Inherited from Product

Inherited from Equals

Inherited from AnyRef

Inherited from Any

Ungrouped