final case class FunctionDef(signature: Option[OpDef] = _root_.scala.None, attr: Map[String, AttrValue] = ..., argAttr: Map[Int, ArgAttrs] = ..., resourceArgUniqueId: Map[Int, Int] = ..., nodeDef: Seq[NodeDef] = _root_.scala.Seq.empty, ret: Map[String, String] = ..., controlRet: Map[String, String] = ..., unknownFields: UnknownFieldSet = ...) extends GeneratedMessage with Updatable[FunctionDef] with Product with Serializable
A function can be instantiated when the runtime can bind every attr with a value. When a GraphDef has a call to a function, it must have binding for every attr defined in the signature.
TODO(zhifengc): * device spec, etc.
- signature
The definition of the function's name, arguments, return values, attrs etc.
- attr
Attributes specific to this function definition.
- resourceArgUniqueId
Unique IDs for each resource argument, used to track aliasing resources. If Argument A and Argument B alias each other, then resource_arg_unique_ids[A.index] == resource_arg_unique_ids[B.index]. If this field is empty, none of the arguments could alias; otherwise, every resource argument should have an entry in this field. When instantiated, the unique IDs will be attached to the _Arg nodes' "_resource_arg_unique_id" attribute.
- nodeDef
By convention, "op" in node_def is resolved by consulting with a user-defined library first. If not resolved, "func" is assumed to be a builtin op.
- ret
A mapping from the output arg names from
signature
to the outputs fromnode_def
that should be returned by the function.- controlRet
A mapping from control output names from
signature
to node names innode_def
which should be control outputs of this function.
- Annotations
- @SerialVersionUID()
- Alphabetic
- By Inheritance
- FunctionDef
- Updatable
- GeneratedMessage
- Serializable
- Serializable
- Product
- Equals
- AnyRef
- Any
- Hide All
- Show All
- Public
- All
Instance Constructors
-
new
FunctionDef(signature: Option[OpDef] = _root_.scala.None, attr: Map[String, AttrValue] = ..., argAttr: Map[Int, ArgAttrs] = ..., resourceArgUniqueId: Map[Int, Int] = ..., nodeDef: Seq[NodeDef] = _root_.scala.Seq.empty, ret: Map[String, String] = ..., controlRet: Map[String, String] = ..., unknownFields: UnknownFieldSet = ...)
- signature
The definition of the function's name, arguments, return values, attrs etc.
- attr
Attributes specific to this function definition.
- resourceArgUniqueId
Unique IDs for each resource argument, used to track aliasing resources. If Argument A and Argument B alias each other, then resource_arg_unique_ids[A.index] == resource_arg_unique_ids[B.index]. If this field is empty, none of the arguments could alias; otherwise, every resource argument should have an entry in this field. When instantiated, the unique IDs will be attached to the _Arg nodes' "_resource_arg_unique_id" attribute.
- nodeDef
By convention, "op" in node_def is resolved by consulting with a user-defined library first. If not resolved, "func" is assumed to be a builtin op.
- ret
A mapping from the output arg names from
signature
to the outputs fromnode_def
that should be returned by the function.- controlRet
A mapping from control output names from
signature
to node names innode_def
which should be control outputs of this function.
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 addAllArgAttr(__vs: Iterable[(Int, ArgAttrs)]): FunctionDef
- def addAllAttr(__vs: Iterable[(String, AttrValue)]): FunctionDef
- def addAllControlRet(__vs: Iterable[(String, String)]): FunctionDef
- def addAllNodeDef(__vs: Iterable[NodeDef]): FunctionDef
- def addAllResourceArgUniqueId(__vs: Iterable[(Int, Int)]): FunctionDef
- def addAllRet(__vs: Iterable[(String, String)]): FunctionDef
- def addArgAttr(__vs: (Int, ArgAttrs)*): FunctionDef
- def addAttr(__vs: (String, AttrValue)*): FunctionDef
- def addControlRet(__vs: (String, String)*): FunctionDef
- def addNodeDef(__vs: NodeDef*): FunctionDef
- def addResourceArgUniqueId(__vs: (Int, Int)*): FunctionDef
- def addRet(__vs: (String, String)*): FunctionDef
- val argAttr: Map[Int, ArgAttrs]
-
final
def
asInstanceOf[T0]: T0
- Definition Classes
- Any
- val attr: Map[String, AttrValue]
- def clearArgAttr: FunctionDef
- def clearAttr: FunctionDef
- def clearControlRet: FunctionDef
- def clearNodeDef: FunctionDef
- def clearResourceArgUniqueId: FunctionDef
- def clearRet: FunctionDef
- def clearSignature: FunctionDef
-
def
clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( ... ) @native() @HotSpotIntrinsicCandidate()
-
def
companion: FunctionDef.type
- Definition Classes
- FunctionDef → GeneratedMessage
- val controlRet: Map[String, String]
- def discardUnknownFields: FunctionDef
-
final
def
eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
final
def
getClass(): Class[_]
- Definition Classes
- AnyRef → Any
- Annotations
- @native() @HotSpotIntrinsicCandidate()
-
def
getField(__field: FieldDescriptor): PValue
- Definition Classes
- FunctionDef → GeneratedMessage
-
def
getFieldByNumber(__fieldNumber: Int): Any
- Definition Classes
- FunctionDef → GeneratedMessage
- def getSignature: OpDef
-
final
def
isInstanceOf[T0]: Boolean
- Definition Classes
- Any
-
final
def
ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- val nodeDef: Seq[NodeDef]
-
final
def
notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native() @HotSpotIntrinsicCandidate()
-
final
def
notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native() @HotSpotIntrinsicCandidate()
- val resourceArgUniqueId: Map[Int, Int]
- val ret: Map[String, String]
-
def
serializedSize: Int
- Definition Classes
- FunctionDef → GeneratedMessage
- val signature: Option[OpDef]
-
final
def
synchronized[T0](arg0: ⇒ T0): T0
- Definition Classes
- AnyRef
-
final
def
toByteArray: Array[Byte]
- Definition Classes
- GeneratedMessage
-
final
def
toByteString: ByteString
- Definition Classes
- GeneratedMessage
-
final
def
toPMessage: PMessage
- Definition Classes
- GeneratedMessage
-
def
toProtoString: String
- Definition Classes
- FunctionDef → GeneratedMessage
- val unknownFields: UnknownFieldSet
-
def
update(ms: (Lens[FunctionDef, FunctionDef]) ⇒ Mutation[FunctionDef]*): FunctionDef
- Definition Classes
- Updatable
-
final
def
wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... ) @native()
-
final
def
wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
- def withArgAttr(__v: Map[Int, ArgAttrs]): FunctionDef
- def withAttr(__v: Map[String, AttrValue]): FunctionDef
- def withControlRet(__v: Map[String, String]): FunctionDef
- def withNodeDef(__v: Seq[NodeDef]): FunctionDef
- def withResourceArgUniqueId(__v: Map[Int, Int]): FunctionDef
- def withRet(__v: Map[String, String]): FunctionDef
- def withSignature(__v: OpDef): FunctionDef
- def withUnknownFields(__v: UnknownFieldSet): FunctionDef
-
final
def
writeDelimitedTo(output: OutputStream): Unit
- Definition Classes
- GeneratedMessage
-
def
writeTo(_output__: CodedOutputStream): Unit
- Definition Classes
- FunctionDef → GeneratedMessage
-
final
def
writeTo(output: OutputStream): Unit
- Definition Classes
- GeneratedMessage
Deprecated Value Members
-
def
finalize(): Unit
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( classOf[java.lang.Throwable] ) @Deprecated
- Deprecated