Class/Object

io.hydrosphere.serving.onnx.onnx

TensorProto

Related Docs: object TensorProto | package onnx

Permalink

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()
Linear Supertypes
Product, Equals, Updatable[TensorProto], Message[TensorProto], GeneratedMessage, Serializable, Serializable, AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. TensorProto
  2. Product
  3. Equals
  4. Updatable
  5. Message
  6. GeneratedMessage
  7. Serializable
  8. Serializable
  9. AnyRef
  10. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Instance Constructors

  1. 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)

    Permalink

    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

  1. final def !=(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  4. def addAllDims(__vs: TraversableOnce[Long]): TensorProto

    Permalink
  5. def addAllDoubleData(__vs: TraversableOnce[Double]): TensorProto

    Permalink
  6. def addAllFloatData(__vs: TraversableOnce[Float]): TensorProto

    Permalink
  7. def addAllInt32Data(__vs: TraversableOnce[Int]): TensorProto

    Permalink
  8. def addAllInt64Data(__vs: TraversableOnce[Long]): TensorProto

    Permalink
  9. def addAllStringData(__vs: TraversableOnce[ByteString]): TensorProto

    Permalink
  10. def addAllUint64Data(__vs: TraversableOnce[Long]): TensorProto

    Permalink
  11. def addDims(__vs: Long*): TensorProto

    Permalink
  12. def addDoubleData(__vs: Double*): TensorProto

    Permalink
  13. def addFloatData(__vs: Float*): TensorProto

    Permalink
  14. def addInt32Data(__vs: Int*): TensorProto

    Permalink
  15. def addInt64Data(__vs: Long*): TensorProto

    Permalink
  16. def addStringData(__vs: ByteString*): TensorProto

    Permalink
  17. def addUint64Data(__vs: Long*): TensorProto

    Permalink
  18. final def asInstanceOf[T0]: T0

    Permalink
    Definition Classes
    Any
  19. def clearDims: TensorProto

    Permalink
  20. def clearDoubleData: TensorProto

    Permalink
  21. def clearFloatData: TensorProto

    Permalink
  22. def clearInt32Data: TensorProto

    Permalink
  23. def clearInt64Data: TensorProto

    Permalink
  24. def clearSegment: TensorProto

    Permalink
  25. def clearStringData: TensorProto

    Permalink
  26. def clearUint64Data: TensorProto

    Permalink
  27. def clone(): AnyRef

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  28. def companion: TensorProto.type

    Permalink
    Definition Classes
    TensorProto → GeneratedMessage
  29. val dataType: DataType

    Permalink

    The data type of the tensor.

  30. val dims: Seq[Long]

    Permalink

    The shape of the tensor.

  31. val docString: String

    Permalink

    A human-readable documentation for this tensor.

    A human-readable documentation for this tensor. Markdown is allowed.

  32. val doubleData: Seq[Double]

    Permalink

    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.

    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

  33. final def eq(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  34. def finalize(): Unit

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  35. val floatData: Seq[Float]

    Permalink

    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.

    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.

  36. final def getClass(): Class[_]

    Permalink
    Definition Classes
    AnyRef → Any
  37. def getField(__field: FieldDescriptor): PValue

    Permalink
    Definition Classes
    TensorProto → GeneratedMessage
  38. def getFieldByNumber(__fieldNumber: Int): Any

    Permalink
    Definition Classes
    TensorProto → GeneratedMessage
  39. def getSegment: Segment

    Permalink
  40. val int32Data: Seq[Int]

    Permalink

    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.

    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

  41. val int64Data: Seq[Long]

    Permalink

    For int64.

    For int64. When this field is present, the data_type field MUST be INT64

  42. final def isInstanceOf[T0]: Boolean

    Permalink
    Definition Classes
    Any
  43. def mergeFrom(_input__: CodedInputStream): TensorProto

    Permalink
    Definition Classes
    TensorProto → Message
  44. val name: String

    Permalink

    Optionally, a name for the tensor.

    Optionally, a name for the tensor. namespace Value

  45. final def ne(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  46. final def notify(): Unit

    Permalink
    Definition Classes
    AnyRef
  47. final def notifyAll(): Unit

    Permalink
    Definition Classes
    AnyRef
  48. val rawData: ByteString

    Permalink

    Serializations can either use one of the fields above, or use this raw bytes field.

    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

  49. val segment: Option[Segment]

    Permalink
  50. final def serializedSize: Int

    Permalink
    Definition Classes
    TensorProto → GeneratedMessage
  51. val stringData: Seq[ByteString]

    Permalink

    For strings.

    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

  52. final def synchronized[T0](arg0: ⇒ T0): T0

    Permalink
    Definition Classes
    AnyRef
  53. def toByteArray: Array[Byte]

    Permalink
    Definition Classes
    GeneratedMessage
  54. def toByteString: ByteString

    Permalink
    Definition Classes
    GeneratedMessage
  55. def toPMessage: PMessage

    Permalink
    Definition Classes
    GeneratedMessage
  56. def toProtoString: String

    Permalink
    Definition Classes
    TensorProto → GeneratedMessage
  57. val uint64Data: Seq[Long]

    Permalink

    For uint64 and uint32 values When this field is present, the data_type field MUST be UINT32 or UINT64

  58. def update(ms: (Lens[TensorProto, TensorProto]) ⇒ Mutation[TensorProto]*): TensorProto

    Permalink
    Definition Classes
    Updatable
  59. final def wait(): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  60. final def wait(arg0: Long, arg1: Int): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  61. final def wait(arg0: Long): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  62. def withDataType(__v: DataType): TensorProto

    Permalink
  63. def withDims(__v: Seq[Long]): TensorProto

    Permalink
  64. def withDocString(__v: String): TensorProto

    Permalink
  65. def withDoubleData(__v: Seq[Double]): TensorProto

    Permalink
  66. def withFloatData(__v: Seq[Float]): TensorProto

    Permalink
  67. def withInt32Data(__v: Seq[Int]): TensorProto

    Permalink
  68. def withInt64Data(__v: Seq[Long]): TensorProto

    Permalink
  69. def withName(__v: String): TensorProto

    Permalink
  70. def withRawData(__v: ByteString): TensorProto

    Permalink
  71. def withSegment(__v: Segment): TensorProto

    Permalink
  72. def withStringData(__v: Seq[ByteString]): TensorProto

    Permalink
  73. def withUint64Data(__v: Seq[Long]): TensorProto

    Permalink
  74. def writeDelimitedTo(output: OutputStream): Unit

    Permalink
    Definition Classes
    GeneratedMessage
  75. def writeTo(_output__: CodedOutputStream): Unit

    Permalink
    Definition Classes
    TensorProto → GeneratedMessage
  76. def writeTo(output: OutputStream): Unit

    Permalink
    Definition Classes
    GeneratedMessage

Deprecated Value Members

  1. def getAllFields: Map[FieldDescriptor, Any]

    Permalink
    Definition Classes
    GeneratedMessage
    Annotations
    @deprecated
    Deprecated

    (Since version 0.6.0) Use toPMessage

  2. def getField(field: FieldDescriptor): Any

    Permalink
    Definition Classes
    GeneratedMessage
    Annotations
    @deprecated
    Deprecated

    (Since version 0.6.0) Use getField that accepts a ScalaPB descriptor and returns PValue

Inherited from Product

Inherited from Equals

Inherited from Updatable[TensorProto]

Inherited from Message[TensorProto]

Inherited from GeneratedMessage

Inherited from Serializable

Inherited from Serializable

Inherited from AnyRef

Inherited from Any

Ungrouped