final case class OpDef(name: String = "", inputArg: Seq[ArgDef] = _root_.scala.Seq.empty, outputArg: Seq[ArgDef] = _root_.scala.Seq.empty, controlOutput: Seq[String] = _root_.scala.Seq.empty, attr: Seq[AttrDef] = _root_.scala.Seq.empty, deprecation: Option[OpDeprecation] = _root_.scala.None, summary: String = "", description: String = "", isCommutative: Boolean = false, isAggregate: Boolean = false, isStateful: Boolean = false, allowsUninitializedInput: Boolean = false, unknownFields: UnknownFieldSet = ...) extends GeneratedMessage with Updatable[OpDef] with Product with Serializable
Defines an operation. A NodeDef in a GraphDef specifies an Op by using the "op" field which should match the name of a OpDef. LINT.IfChange
- name
Op names starting with an underscore are reserved for internal use. Names should be CamelCase and match the regexp "[A-Z][a-zA-Z0-9>_]*".
- inputArg
Description of the input(s).
- outputArg
Description of the output(s).
- controlOutput
Named control outputs for this operation. Useful only for composite operations (i.e. functions) which want to name different control outputs.
- deprecation
Optional deprecation based on GraphDef versions.
- summary
One-line human-readable description of what the Op does.
- description
Additional, longer human-readable description of what the Op does.
- isCommutative
True if the operation is commutative ("op(a,b) == op(b,a)" for all inputs)
- isAggregate
If is_aggregate is true, then this operation accepts N >= 2 inputs and produces 1 output all of the same type. Should be associative and commutative, and produce output with the same shape as the input. The optimizer may replace an aggregate op taking input from multiple devices with a tree of aggregate ops that aggregate locally within each device (and possibly within groups of nearby devices) before communicating. TODO(josh11b): Implement that optimization. for things like add
- isStateful
Ops are marked as stateful if their behavior depends on some state beyond their input tensors (e.g. variable reading op) or if they have a side-effect (e.g. printing or asserting ops). Equivalently, stateless ops must always produce the same output for the same input and have no side-effects. By default Ops may be moved between devices. Stateful ops should either not be moved, or should only be moved if that state can also be moved (e.g. via some sort of save / restore). Stateful ops are guaranteed to never be optimized away by Common Subexpression Elimination (CSE). for things like variables, queue
- allowsUninitializedInput
By default, all inputs to an Op must be initialized Tensors. Ops that may initialize tensors for the first time should set this field to true, to allow the Op to take an uninitialized Tensor as input. for Assign, etc.
- Annotations
- @SerialVersionUID()
- Alphabetic
- By Inheritance
- OpDef
- Updatable
- GeneratedMessage
- Serializable
- Serializable
- Product
- Equals
- AnyRef
- Any
- Hide All
- Show All
- Public
- All
Instance Constructors
-
new
OpDef(name: String = "", inputArg: Seq[ArgDef] = _root_.scala.Seq.empty, outputArg: Seq[ArgDef] = _root_.scala.Seq.empty, controlOutput: Seq[String] = _root_.scala.Seq.empty, attr: Seq[AttrDef] = _root_.scala.Seq.empty, deprecation: Option[OpDeprecation] = _root_.scala.None, summary: String = "", description: String = "", isCommutative: Boolean = false, isAggregate: Boolean = false, isStateful: Boolean = false, allowsUninitializedInput: Boolean = false, unknownFields: UnknownFieldSet = ...)
- name
Op names starting with an underscore are reserved for internal use. Names should be CamelCase and match the regexp "[A-Z][a-zA-Z0-9>_]*".
- inputArg
Description of the input(s).
- outputArg
Description of the output(s).
- controlOutput
Named control outputs for this operation. Useful only for composite operations (i.e. functions) which want to name different control outputs.
- deprecation
Optional deprecation based on GraphDef versions.
- summary
One-line human-readable description of what the Op does.
- description
Additional, longer human-readable description of what the Op does.
- isCommutative
True if the operation is commutative ("op(a,b) == op(b,a)" for all inputs)
- isAggregate
If is_aggregate is true, then this operation accepts N >= 2 inputs and produces 1 output all of the same type. Should be associative and commutative, and produce output with the same shape as the input. The optimizer may replace an aggregate op taking input from multiple devices with a tree of aggregate ops that aggregate locally within each device (and possibly within groups of nearby devices) before communicating. TODO(josh11b): Implement that optimization. for things like add
- isStateful
Ops are marked as stateful if their behavior depends on some state beyond their input tensors (e.g. variable reading op) or if they have a side-effect (e.g. printing or asserting ops). Equivalently, stateless ops must always produce the same output for the same input and have no side-effects. By default Ops may be moved between devices. Stateful ops should either not be moved, or should only be moved if that state can also be moved (e.g. via some sort of save / restore). Stateful ops are guaranteed to never be optimized away by Common Subexpression Elimination (CSE). for things like variables, queue
- allowsUninitializedInput
By default, all inputs to an Op must be initialized Tensors. Ops that may initialize tensors for the first time should set this field to true, to allow the Op to take an uninitialized Tensor as input. for Assign, etc.
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 addAllAttr(__vs: Iterable[AttrDef]): OpDef
- def addAllControlOutput(__vs: Iterable[String]): OpDef
- def addAllInputArg(__vs: Iterable[ArgDef]): OpDef
- def addAllOutputArg(__vs: Iterable[ArgDef]): OpDef
- def addAttr(__vs: AttrDef*): OpDef
- def addControlOutput(__vs: String*): OpDef
- def addInputArg(__vs: ArgDef*): OpDef
- def addOutputArg(__vs: ArgDef*): OpDef
- val allowsUninitializedInput: Boolean
-
final
def
asInstanceOf[T0]: T0
- Definition Classes
- Any
- val attr: Seq[AttrDef]
- def clearAttr: OpDef
- def clearControlOutput: OpDef
- def clearDeprecation: OpDef
- def clearInputArg: OpDef
- def clearOutputArg: OpDef
-
def
clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( ... ) @native() @HotSpotIntrinsicCandidate()
-
def
companion: OpDef.type
- Definition Classes
- OpDef → GeneratedMessage
- val controlOutput: Seq[String]
- val deprecation: Option[OpDeprecation]
- val description: String
- def discardUnknownFields: OpDef
-
final
def
eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
final
def
getClass(): Class[_]
- Definition Classes
- AnyRef → Any
- Annotations
- @native() @HotSpotIntrinsicCandidate()
- def getDeprecation: OpDeprecation
-
def
getField(__field: FieldDescriptor): PValue
- Definition Classes
- OpDef → GeneratedMessage
-
def
getFieldByNumber(__fieldNumber: Int): Any
- Definition Classes
- OpDef → GeneratedMessage
- val inputArg: Seq[ArgDef]
- val isAggregate: Boolean
- val isCommutative: Boolean
-
final
def
isInstanceOf[T0]: Boolean
- Definition Classes
- Any
- val isStateful: Boolean
- val name: String
-
final
def
ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
final
def
notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native() @HotSpotIntrinsicCandidate()
-
final
def
notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native() @HotSpotIntrinsicCandidate()
- val outputArg: Seq[ArgDef]
-
def
serializedSize: Int
- Definition Classes
- OpDef → GeneratedMessage
- val summary: String
-
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
- OpDef → GeneratedMessage
- val unknownFields: UnknownFieldSet
-
def
update(ms: (Lens[OpDef, OpDef]) ⇒ Mutation[OpDef]*): OpDef
- 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 withAllowsUninitializedInput(__v: Boolean): OpDef
- def withAttr(__v: Seq[AttrDef]): OpDef
- def withControlOutput(__v: Seq[String]): OpDef
- def withDeprecation(__v: OpDeprecation): OpDef
- def withDescription(__v: String): OpDef
- def withInputArg(__v: Seq[ArgDef]): OpDef
- def withIsAggregate(__v: Boolean): OpDef
- def withIsCommutative(__v: Boolean): OpDef
- def withIsStateful(__v: Boolean): OpDef
- def withName(__v: String): OpDef
- def withOutputArg(__v: Seq[ArgDef]): OpDef
- def withSummary(__v: String): OpDef
- def withUnknownFields(__v: UnknownFieldSet): OpDef
-
final
def
writeDelimitedTo(output: OutputStream): Unit
- Definition Classes
- GeneratedMessage
-
def
writeTo(_output__: CodedOutputStream): Unit
- Definition Classes
- OpDef → 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