Class OpDef

java.lang.Object
com.google.protobuf.AbstractMessageLite
com.google.protobuf.AbstractMessage
com.google.protobuf.GeneratedMessageV3
org.tensorflow.framework.OpDef
All Implemented Interfaces:
com.google.protobuf.Message, com.google.protobuf.MessageLite, com.google.protobuf.MessageLiteOrBuilder, com.google.protobuf.MessageOrBuilder, Serializable, OpDefOrBuilder

public final class OpDef extends com.google.protobuf.GeneratedMessageV3 implements OpDefOrBuilder
 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
 
Protobuf type tensorflow.OpDef
See Also:
  • Field Details

    • NAME_FIELD_NUMBER

      public static final int NAME_FIELD_NUMBER
      See Also:
    • INPUT_ARG_FIELD_NUMBER

      public static final int INPUT_ARG_FIELD_NUMBER
      See Also:
    • OUTPUT_ARG_FIELD_NUMBER

      public static final int OUTPUT_ARG_FIELD_NUMBER
      See Also:
    • CONTROL_OUTPUT_FIELD_NUMBER

      public static final int CONTROL_OUTPUT_FIELD_NUMBER
      See Also:
    • ATTR_FIELD_NUMBER

      public static final int ATTR_FIELD_NUMBER
      See Also:
    • DEPRECATION_FIELD_NUMBER

      public static final int DEPRECATION_FIELD_NUMBER
      See Also:
    • SUMMARY_FIELD_NUMBER

      public static final int SUMMARY_FIELD_NUMBER
      See Also:
    • DESCRIPTION_FIELD_NUMBER

      public static final int DESCRIPTION_FIELD_NUMBER
      See Also:
    • IS_COMMUTATIVE_FIELD_NUMBER

      public static final int IS_COMMUTATIVE_FIELD_NUMBER
      See Also:
    • IS_AGGREGATE_FIELD_NUMBER

      public static final int IS_AGGREGATE_FIELD_NUMBER
      See Also:
    • IS_STATEFUL_FIELD_NUMBER

      public static final int IS_STATEFUL_FIELD_NUMBER
      See Also:
    • ALLOWS_UNINITIALIZED_INPUT_FIELD_NUMBER

      public static final int ALLOWS_UNINITIALIZED_INPUT_FIELD_NUMBER
      See Also:
    • IS_DISTRIBUTED_COMMUNICATION_FIELD_NUMBER

      public static final int IS_DISTRIBUTED_COMMUNICATION_FIELD_NUMBER
      See Also:
  • Method Details

    • newInstance

      protected Object newInstance(com.google.protobuf.GeneratedMessageV3.UnusedPrivateParameter unused)
      Overrides:
      newInstance in class com.google.protobuf.GeneratedMessageV3
    • getDescriptor

      public static final com.google.protobuf.Descriptors.Descriptor getDescriptor()
    • internalGetFieldAccessorTable

      protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
      Specified by:
      internalGetFieldAccessorTable in class com.google.protobuf.GeneratedMessageV3
    • getName

      public String getName()
       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>_]*".
       
      string name = 1;
      Specified by:
      getName in interface OpDefOrBuilder
      Returns:
      The name.
    • getNameBytes

      public com.google.protobuf.ByteString getNameBytes()
       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>_]*".
       
      string name = 1;
      Specified by:
      getNameBytes in interface OpDefOrBuilder
      Returns:
      The bytes for name.
    • getInputArgList

      public List<OpDef.ArgDef> getInputArgList()
       Description of the input(s).
       
      repeated .tensorflow.OpDef.ArgDef input_arg = 2;
      Specified by:
      getInputArgList in interface OpDefOrBuilder
    • getInputArgOrBuilderList

      public List<? extends OpDef.ArgDefOrBuilder> getInputArgOrBuilderList()
       Description of the input(s).
       
      repeated .tensorflow.OpDef.ArgDef input_arg = 2;
      Specified by:
      getInputArgOrBuilderList in interface OpDefOrBuilder
    • getInputArgCount

      public int getInputArgCount()
       Description of the input(s).
       
      repeated .tensorflow.OpDef.ArgDef input_arg = 2;
      Specified by:
      getInputArgCount in interface OpDefOrBuilder
    • getInputArg

      public OpDef.ArgDef getInputArg(int index)
       Description of the input(s).
       
      repeated .tensorflow.OpDef.ArgDef input_arg = 2;
      Specified by:
      getInputArg in interface OpDefOrBuilder
    • getInputArgOrBuilder

      public OpDef.ArgDefOrBuilder getInputArgOrBuilder(int index)
       Description of the input(s).
       
      repeated .tensorflow.OpDef.ArgDef input_arg = 2;
      Specified by:
      getInputArgOrBuilder in interface OpDefOrBuilder
    • getOutputArgList

      public List<OpDef.ArgDef> getOutputArgList()
       Description of the output(s).
       
      repeated .tensorflow.OpDef.ArgDef output_arg = 3;
      Specified by:
      getOutputArgList in interface OpDefOrBuilder
    • getOutputArgOrBuilderList

      public List<? extends OpDef.ArgDefOrBuilder> getOutputArgOrBuilderList()
       Description of the output(s).
       
      repeated .tensorflow.OpDef.ArgDef output_arg = 3;
      Specified by:
      getOutputArgOrBuilderList in interface OpDefOrBuilder
    • getOutputArgCount

      public int getOutputArgCount()
       Description of the output(s).
       
      repeated .tensorflow.OpDef.ArgDef output_arg = 3;
      Specified by:
      getOutputArgCount in interface OpDefOrBuilder
    • getOutputArg

      public OpDef.ArgDef getOutputArg(int index)
       Description of the output(s).
       
      repeated .tensorflow.OpDef.ArgDef output_arg = 3;
      Specified by:
      getOutputArg in interface OpDefOrBuilder
    • getOutputArgOrBuilder

      public OpDef.ArgDefOrBuilder getOutputArgOrBuilder(int index)
       Description of the output(s).
       
      repeated .tensorflow.OpDef.ArgDef output_arg = 3;
      Specified by:
      getOutputArgOrBuilder in interface OpDefOrBuilder
    • getControlOutputList

      public com.google.protobuf.ProtocolStringList getControlOutputList()
       Named control outputs for this operation. Useful only for composite
       operations (i.e. functions) which want to name different control outputs.
       
      repeated string control_output = 20;
      Specified by:
      getControlOutputList in interface OpDefOrBuilder
      Returns:
      A list containing the controlOutput.
    • getControlOutputCount

      public int getControlOutputCount()
       Named control outputs for this operation. Useful only for composite
       operations (i.e. functions) which want to name different control outputs.
       
      repeated string control_output = 20;
      Specified by:
      getControlOutputCount in interface OpDefOrBuilder
      Returns:
      The count of controlOutput.
    • getControlOutput

      public String getControlOutput(int index)
       Named control outputs for this operation. Useful only for composite
       operations (i.e. functions) which want to name different control outputs.
       
      repeated string control_output = 20;
      Specified by:
      getControlOutput in interface OpDefOrBuilder
      Parameters:
      index - The index of the element to return.
      Returns:
      The controlOutput at the given index.
    • getControlOutputBytes

      public com.google.protobuf.ByteString getControlOutputBytes(int index)
       Named control outputs for this operation. Useful only for composite
       operations (i.e. functions) which want to name different control outputs.
       
      repeated string control_output = 20;
      Specified by:
      getControlOutputBytes in interface OpDefOrBuilder
      Parameters:
      index - The index of the value to return.
      Returns:
      The bytes of the controlOutput at the given index.
    • getAttrList

      public List<OpDef.AttrDef> getAttrList()
      repeated .tensorflow.OpDef.AttrDef attr = 4;
      Specified by:
      getAttrList in interface OpDefOrBuilder
    • getAttrOrBuilderList

      public List<? extends OpDef.AttrDefOrBuilder> getAttrOrBuilderList()
      repeated .tensorflow.OpDef.AttrDef attr = 4;
      Specified by:
      getAttrOrBuilderList in interface OpDefOrBuilder
    • getAttrCount

      public int getAttrCount()
      repeated .tensorflow.OpDef.AttrDef attr = 4;
      Specified by:
      getAttrCount in interface OpDefOrBuilder
    • getAttr

      public OpDef.AttrDef getAttr(int index)
      repeated .tensorflow.OpDef.AttrDef attr = 4;
      Specified by:
      getAttr in interface OpDefOrBuilder
    • getAttrOrBuilder

      public OpDef.AttrDefOrBuilder getAttrOrBuilder(int index)
      repeated .tensorflow.OpDef.AttrDef attr = 4;
      Specified by:
      getAttrOrBuilder in interface OpDefOrBuilder
    • hasDeprecation

      public boolean hasDeprecation()
       Optional deprecation based on GraphDef versions.
       
      .tensorflow.OpDeprecation deprecation = 8;
      Specified by:
      hasDeprecation in interface OpDefOrBuilder
      Returns:
      Whether the deprecation field is set.
    • getDeprecation

      public OpDeprecation getDeprecation()
       Optional deprecation based on GraphDef versions.
       
      .tensorflow.OpDeprecation deprecation = 8;
      Specified by:
      getDeprecation in interface OpDefOrBuilder
      Returns:
      The deprecation.
    • getDeprecationOrBuilder

      public OpDeprecationOrBuilder getDeprecationOrBuilder()
       Optional deprecation based on GraphDef versions.
       
      .tensorflow.OpDeprecation deprecation = 8;
      Specified by:
      getDeprecationOrBuilder in interface OpDefOrBuilder
    • getSummary

      public String getSummary()
       One-line human-readable description of what the Op does.
       
      string summary = 5;
      Specified by:
      getSummary in interface OpDefOrBuilder
      Returns:
      The summary.
    • getSummaryBytes

      public com.google.protobuf.ByteString getSummaryBytes()
       One-line human-readable description of what the Op does.
       
      string summary = 5;
      Specified by:
      getSummaryBytes in interface OpDefOrBuilder
      Returns:
      The bytes for summary.
    • getDescription

      public String getDescription()
       Additional, longer human-readable description of what the Op does.
       
      string description = 6;
      Specified by:
      getDescription in interface OpDefOrBuilder
      Returns:
      The description.
    • getDescriptionBytes

      public com.google.protobuf.ByteString getDescriptionBytes()
       Additional, longer human-readable description of what the Op does.
       
      string description = 6;
      Specified by:
      getDescriptionBytes in interface OpDefOrBuilder
      Returns:
      The bytes for description.
    • getIsCommutative

      public boolean getIsCommutative()
       True if the operation is commutative ("op(a,b) == op(b,a)" for all inputs)
       
      bool is_commutative = 18;
      Specified by:
      getIsCommutative in interface OpDefOrBuilder
      Returns:
      The isCommutative.
    • getIsAggregate

      public boolean getIsAggregate()
       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.
       
      bool is_aggregate = 16;
      Specified by:
      getIsAggregate in interface OpDefOrBuilder
      Returns:
      The isAggregate.
    • getIsStateful

      public boolean getIsStateful()
       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).
       
      bool is_stateful = 17;
      Specified by:
      getIsStateful in interface OpDefOrBuilder
      Returns:
      The isStateful.
    • getAllowsUninitializedInput

      public boolean getAllowsUninitializedInput()
       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.
       
      bool allows_uninitialized_input = 19;
      Specified by:
      getAllowsUninitializedInput in interface OpDefOrBuilder
      Returns:
      The allowsUninitializedInput.
    • getIsDistributedCommunication

      public boolean getIsDistributedCommunication()
       Indicates whether the op implementation uses distributed communication.
       If True, the op is allowed to return errors for network disconnection and
       trigger TF network failure handling logics.
       
      bool is_distributed_communication = 21;
      Specified by:
      getIsDistributedCommunication in interface OpDefOrBuilder
      Returns:
      The isDistributedCommunication.
    • isInitialized

      public final boolean isInitialized()
      Specified by:
      isInitialized in interface com.google.protobuf.MessageLiteOrBuilder
      Overrides:
      isInitialized in class com.google.protobuf.GeneratedMessageV3
    • writeTo

      public void writeTo(com.google.protobuf.CodedOutputStream output) throws IOException
      Specified by:
      writeTo in interface com.google.protobuf.MessageLite
      Overrides:
      writeTo in class com.google.protobuf.GeneratedMessageV3
      Throws:
      IOException
    • getSerializedSize

      public int getSerializedSize()
      Specified by:
      getSerializedSize in interface com.google.protobuf.MessageLite
      Overrides:
      getSerializedSize in class com.google.protobuf.GeneratedMessageV3
    • equals

      public boolean equals(Object obj)
      Specified by:
      equals in interface com.google.protobuf.Message
      Overrides:
      equals in class com.google.protobuf.AbstractMessage
    • hashCode

      public int hashCode()
      Specified by:
      hashCode in interface com.google.protobuf.Message
      Overrides:
      hashCode in class com.google.protobuf.AbstractMessage
    • parseFrom

      public static OpDef parseFrom(ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException
      Throws:
      com.google.protobuf.InvalidProtocolBufferException
    • parseFrom

      public static OpDef parseFrom(ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
      Throws:
      com.google.protobuf.InvalidProtocolBufferException
    • parseFrom

      public static OpDef parseFrom(com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException
      Throws:
      com.google.protobuf.InvalidProtocolBufferException
    • parseFrom

      public static OpDef parseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
      Throws:
      com.google.protobuf.InvalidProtocolBufferException
    • parseFrom

      public static OpDef parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException
      Throws:
      com.google.protobuf.InvalidProtocolBufferException
    • parseFrom

      public static OpDef parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
      Throws:
      com.google.protobuf.InvalidProtocolBufferException
    • parseFrom

      public static OpDef parseFrom(InputStream input) throws IOException
      Throws:
      IOException
    • parseFrom

      public static OpDef parseFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
      Throws:
      IOException
    • parseDelimitedFrom

      public static OpDef parseDelimitedFrom(InputStream input) throws IOException
      Throws:
      IOException
    • parseDelimitedFrom

      public static OpDef parseDelimitedFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
      Throws:
      IOException
    • parseFrom

      public static OpDef parseFrom(com.google.protobuf.CodedInputStream input) throws IOException
      Throws:
      IOException
    • parseFrom

      public static OpDef parseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
      Throws:
      IOException
    • newBuilderForType

      public OpDef.Builder newBuilderForType()
      Specified by:
      newBuilderForType in interface com.google.protobuf.Message
      Specified by:
      newBuilderForType in interface com.google.protobuf.MessageLite
    • newBuilder

      public static OpDef.Builder newBuilder()
    • newBuilder

      public static OpDef.Builder newBuilder(OpDef prototype)
    • toBuilder

      public OpDef.Builder toBuilder()
      Specified by:
      toBuilder in interface com.google.protobuf.Message
      Specified by:
      toBuilder in interface com.google.protobuf.MessageLite
    • newBuilderForType

      protected OpDef.Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent)
      Specified by:
      newBuilderForType in class com.google.protobuf.GeneratedMessageV3
    • getDefaultInstance

      public static OpDef getDefaultInstance()
    • parser

      public static com.google.protobuf.Parser<OpDef> parser()
    • getParserForType

      public com.google.protobuf.Parser<OpDef> getParserForType()
      Specified by:
      getParserForType in interface com.google.protobuf.Message
      Specified by:
      getParserForType in interface com.google.protobuf.MessageLite
      Overrides:
      getParserForType in class com.google.protobuf.GeneratedMessageV3
    • getDefaultInstanceForType

      public OpDef getDefaultInstanceForType()
      Specified by:
      getDefaultInstanceForType in interface com.google.protobuf.MessageLiteOrBuilder
      Specified by:
      getDefaultInstanceForType in interface com.google.protobuf.MessageOrBuilder