AttributeProto

@SerialVersionUID(0L)
final case class AttributeProto(name: Option[String], refAttrName: Option[String], docString: Option[String], `type`: Option[AttributeType], f: Option[Float], i: Option[Long], s: Option[ByteString], t: Option[TensorProto], g: Option[GraphProto], sparseTensor: Option[SparseTensorProto], floats: Seq[Float], ints: Seq[Long], strings: Seq[ByteString], tensors: Seq[TensorProto], graphs: Seq[GraphProto], sparseTensors: Seq[SparseTensorProto], unknownFields: UnknownFieldSet) extends GeneratedMessage with Updatable[AttributeProto]

Attributes

A named attribute containing either singular float, integer, string, graph, and tensor values, or repeated float, integer, string, graph, and tensor values. An AttributeProto MUST contain the name field, and only one of the following content fields, effectively enforcing a C/C++ union equivalent.

Value parameters:
docString

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

f

Exactly ONE of the following fields must be present for this version of the IR float

floats

list of floats

g

graph

graphs

list of graph

i

int

ints

list of ints

name

The name field MUST be present for this version of the IR. namespace Attribute

refAttrName

if ref_attr_name is not empty, ref_attr_name is the attribute name in parent function. In this case, this AttributeProto does not contain data, and it's a reference of attribute in parent scope. NOTE: This should ONLY be used in function (sub-graph). It's invalid to be used in main graph.

s

UTF-8 string

sparseTensor

sparse tensor value

sparseTensors

list of sparse tensors

strings

list of UTF-8 strings

t

tensor value

tensors

list of tensors

type

The type field MUST be present for this version of the IR. For 0.0.1 versions of the IR, this field was not defined, and implementations needed to use has_field heuristics to determine which value field was in use. For IR_VERSION 0.0.2 or later, this field MUST be set and match the f|i|s|t|... field in use. This change was made to accommodate proto3 implementations. discriminator that indicates which field below is in use

Companion:
object
trait Updatable[AttributeProto]
trait GeneratedMessage
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any

Value members

Concrete methods

def addAllFloats(`__vs`: Iterable[Float]): AttributeProto
def addAllGraphs(`__vs`: Iterable[GraphProto]): AttributeProto
def addAllInts(`__vs`: Iterable[Long]): AttributeProto
def addAllStrings(`__vs`: Iterable[ByteString]): AttributeProto
def addAllTensors(`__vs`: Iterable[TensorProto]): AttributeProto
def addFloats(`__vs`: Float*): AttributeProto
def addInts(`__vs`: Long*): AttributeProto
def addStrings(`__vs`: ByteString*): AttributeProto
def getDocString: String
def getF: Float
def getField(`__field`: FieldDescriptor): PValue
def getFieldByNumber(`__fieldNumber`: Int): Any
def getI: Long
def getName: String
def getRefAttrName: String
def getS: ByteString
override def serializedSize: Int
Definition Classes
GeneratedMessage
def toProtoString: String
def withDocString(`__v`: String): AttributeProto
def withF(`__v`: Float): AttributeProto
def withFloats(`__v`: Seq[Float]): AttributeProto
def withI(`__v`: Long): AttributeProto
def withInts(`__v`: Seq[Long]): AttributeProto
def withName(`__v`: String): AttributeProto
def withRefAttrName(`__v`: String): AttributeProto
def withS(`__v`: ByteString): AttributeProto
def withStrings(`__v`: Seq[ByteString]): AttributeProto
def withUnknownFields(`__v`: UnknownFieldSet): AttributeProto
def writeTo(`_output__`: CodedOutputStream): Unit

Inherited methods

def productElementNames: Iterator[String]
Inherited from:
Product
def productIterator: Iterator[Any]
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

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

Inherited from:
GeneratedMessage
final def toPMessage: PMessage
Inherited from:
GeneratedMessage
Inherited from:
Updatable
final def writeDelimitedTo(output: OutputStream): Unit
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

Inherited from:
GeneratedMessage