Class OpDef

  • All Implemented Interfaces:
    com.google.protobuf.Message, com.google.protobuf.MessageLite, com.google.protobuf.MessageLiteOrBuilder, com.google.protobuf.MessageOrBuilder, java.io.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 org.platanios.tensorflow.proto.OpDef
    See Also:
    Serialized Form
    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
      static class  OpDef.ArgDef
      For describing inputs and outputs.
      static interface  OpDef.ArgDefOrBuilder  
      static class  OpDef.AttrDef
      Description of the graph-construction-time configuration of this Op.
      static interface  OpDef.AttrDefOrBuilder  
      static class  OpDef.Builder
      Defines an operation.
      • Nested classes/interfaces inherited from class com.google.protobuf.GeneratedMessageV3

        com.google.protobuf.GeneratedMessageV3.BuilderParent, com.google.protobuf.GeneratedMessageV3.ExtendableBuilder<MessageType extends com.google.protobuf.GeneratedMessageV3.ExtendableMessage,​BuilderType extends com.google.protobuf.GeneratedMessageV3.ExtendableBuilder<MessageType,​BuilderType>>, com.google.protobuf.GeneratedMessageV3.ExtendableMessage<MessageType extends com.google.protobuf.GeneratedMessageV3.ExtendableMessage>, com.google.protobuf.GeneratedMessageV3.ExtendableMessageOrBuilder<MessageType extends com.google.protobuf.GeneratedMessageV3.ExtendableMessage>, com.google.protobuf.GeneratedMessageV3.FieldAccessorTable, com.google.protobuf.GeneratedMessageV3.UnusedPrivateParameter
      • Nested classes/interfaces inherited from class com.google.protobuf.AbstractMessageLite

        com.google.protobuf.AbstractMessageLite.InternalOneOfEnum
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      boolean equals​(java.lang.Object obj)  
      boolean getAllowsUninitializedInput()
      By default, all inputs to an Op must be initialized Tensors.
      OpDef.AttrDef getAttr​(int index)
      repeated .org.platanios.tensorflow.proto.OpDef.AttrDef attr = 4;
      int getAttrCount()
      repeated .org.platanios.tensorflow.proto.OpDef.AttrDef attr = 4;
      java.util.List<OpDef.AttrDef> getAttrList()
      repeated .org.platanios.tensorflow.proto.OpDef.AttrDef attr = 4;
      OpDef.AttrDefOrBuilder getAttrOrBuilder​(int index)
      repeated .org.platanios.tensorflow.proto.OpDef.AttrDef attr = 4;
      java.util.List<? extends OpDef.AttrDefOrBuilder> getAttrOrBuilderList()
      repeated .org.platanios.tensorflow.proto.OpDef.AttrDef attr = 4;
      java.lang.String getControlOutput​(int index)
      Named control outputs for this operation.
      com.google.protobuf.ByteString getControlOutputBytes​(int index)
      Named control outputs for this operation.
      int getControlOutputCount()
      Named control outputs for this operation.
      com.google.protobuf.ProtocolStringList getControlOutputList()
      Named control outputs for this operation.
      static OpDef getDefaultInstance()  
      OpDef getDefaultInstanceForType()  
      OpDeprecation getDeprecation()
      Optional deprecation based on GraphDef versions.
      OpDeprecationOrBuilder getDeprecationOrBuilder()
      Optional deprecation based on GraphDef versions.
      java.lang.String getDescription()
      Additional, longer human-readable description of what the Op does.
      com.google.protobuf.ByteString getDescriptionBytes()
      Additional, longer human-readable description of what the Op does.
      static com.google.protobuf.Descriptors.Descriptor getDescriptor()  
      OpDef.ArgDef getInputArg​(int index)
      Description of the input(s).
      int getInputArgCount()
      Description of the input(s).
      java.util.List<OpDef.ArgDef> getInputArgList()
      Description of the input(s).
      OpDef.ArgDefOrBuilder getInputArgOrBuilder​(int index)
      Description of the input(s).
      java.util.List<? extends OpDef.ArgDefOrBuilder> getInputArgOrBuilderList()
      Description of the input(s).
      boolean getIsAggregate()
      If is_aggregate is true, then this operation accepts N >= 2 inputs and produces 1 output all of the same type.
      boolean getIsCommutative()
      True if the operation is commutative ("op(a,b) == op(b,a)" for all inputs)
      boolean getIsStateful()
      Ops are marked as stateful if their behavior depends on some state beyond their input tensors (e.g.
      java.lang.String getName()
      Op names starting with an underscore are reserved for internal use.
      com.google.protobuf.ByteString getNameBytes()
      Op names starting with an underscore are reserved for internal use.
      OpDef.ArgDef getOutputArg​(int index)
      Description of the output(s).
      int getOutputArgCount()
      Description of the output(s).
      java.util.List<OpDef.ArgDef> getOutputArgList()
      Description of the output(s).
      OpDef.ArgDefOrBuilder getOutputArgOrBuilder​(int index)
      Description of the output(s).
      java.util.List<? extends OpDef.ArgDefOrBuilder> getOutputArgOrBuilderList()
      Description of the output(s).
      com.google.protobuf.Parser<OpDef> getParserForType()  
      int getSerializedSize()  
      java.lang.String getSummary()
      One-line human-readable description of what the Op does.
      com.google.protobuf.ByteString getSummaryBytes()
      One-line human-readable description of what the Op does.
      com.google.protobuf.UnknownFieldSet getUnknownFields()  
      boolean hasDeprecation()
      Optional deprecation based on GraphDef versions.
      int hashCode()  
      protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()  
      boolean isInitialized()  
      static OpDef.Builder newBuilder()  
      static OpDef.Builder newBuilder​(OpDef prototype)  
      OpDef.Builder newBuilderForType()  
      protected OpDef.Builder newBuilderForType​(com.google.protobuf.GeneratedMessageV3.BuilderParent parent)  
      protected java.lang.Object newInstance​(com.google.protobuf.GeneratedMessageV3.UnusedPrivateParameter unused)  
      static OpDef parseDelimitedFrom​(java.io.InputStream input)  
      static OpDef parseDelimitedFrom​(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)  
      static OpDef parseFrom​(byte[] data)  
      static OpDef parseFrom​(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)  
      static OpDef parseFrom​(com.google.protobuf.ByteString data)  
      static OpDef parseFrom​(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)  
      static OpDef parseFrom​(com.google.protobuf.CodedInputStream input)  
      static OpDef parseFrom​(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)  
      static OpDef parseFrom​(java.io.InputStream input)  
      static OpDef parseFrom​(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)  
      static OpDef parseFrom​(java.nio.ByteBuffer data)  
      static OpDef parseFrom​(java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)  
      static com.google.protobuf.Parser<OpDef> parser()  
      OpDef.Builder toBuilder()  
      void writeTo​(com.google.protobuf.CodedOutputStream output)  
      • Methods inherited from class com.google.protobuf.GeneratedMessageV3

        canUseUnsafe, computeStringSize, computeStringSizeNoTag, emptyBooleanList, emptyDoubleList, emptyFloatList, emptyIntList, emptyLongList, getAllFields, getDescriptorForType, getField, getOneofFieldDescriptor, getRepeatedField, getRepeatedFieldCount, hasField, hasOneof, internalGetMapField, makeExtensionsImmutable, mergeFromAndMakeImmutableInternal, mutableCopy, mutableCopy, mutableCopy, mutableCopy, mutableCopy, newBooleanList, newBuilderForType, newDoubleList, newFloatList, newIntList, newLongList, parseDelimitedWithIOException, parseDelimitedWithIOException, parseUnknownField, parseUnknownFieldProto3, parseWithIOException, parseWithIOException, parseWithIOException, parseWithIOException, serializeBooleanMapTo, serializeIntegerMapTo, serializeLongMapTo, serializeStringMapTo, writeReplace, writeString, writeStringNoTag
      • Methods inherited from class com.google.protobuf.AbstractMessage

        findInitializationErrors, getInitializationErrorString, hashBoolean, hashEnum, hashEnumList, hashFields, hashLong, toString
      • Methods inherited from class com.google.protobuf.AbstractMessageLite

        addAll, addAll, checkByteStringIsUtf8, toByteArray, toByteString, writeDelimitedTo, writeTo
      • Methods inherited from class java.lang.Object

        clone, finalize, getClass, notify, notifyAll, wait, wait, wait
      • Methods inherited from interface com.google.protobuf.MessageLite

        toByteArray, toByteString, writeDelimitedTo, writeTo
      • Methods inherited from interface com.google.protobuf.MessageOrBuilder

        findInitializationErrors, getAllFields, getDescriptorForType, getField, getInitializationErrorString, getOneofFieldDescriptor, getRepeatedField, getRepeatedFieldCount, hasField, hasOneof
    • Method Detail

      • newInstance

        protected java.lang.Object newInstance​(com.google.protobuf.GeneratedMessageV3.UnusedPrivateParameter unused)
        Overrides:
        newInstance in class com.google.protobuf.GeneratedMessageV3
      • getUnknownFields

        public final com.google.protobuf.UnknownFieldSet getUnknownFields()
        Specified by:
        getUnknownFields in interface com.google.protobuf.MessageOrBuilder
        Overrides:
        getUnknownFields 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 java.lang.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 java.util.List<OpDef.ArgDef> getInputArgList()
         Description of the input(s).
         
        repeated .org.platanios.tensorflow.proto.OpDef.ArgDef input_arg = 2;
        Specified by:
        getInputArgList in interface OpDefOrBuilder
      • getInputArgCount

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

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

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

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

        public OpDef.ArgDef getOutputArg​(int index)
         Description of the output(s).
         
        repeated .org.platanios.tensorflow.proto.OpDef.ArgDef output_arg = 3;
        Specified by:
        getOutputArg 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 java.lang.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.
      • getAttrCount

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

        public OpDef.AttrDef getAttr​(int index)
        repeated .org.platanios.tensorflow.proto.OpDef.AttrDef attr = 4;
        Specified by:
        getAttr in interface OpDefOrBuilder
      • hasDeprecation

        public boolean hasDeprecation()
         Optional deprecation based on GraphDef versions.
         
        .org.platanios.tensorflow.proto.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.
         
        .org.platanios.tensorflow.proto.OpDeprecation deprecation = 8;
        Specified by:
        getDeprecation in interface OpDefOrBuilder
        Returns:
        The deprecation.
      • getSummary

        public java.lang.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 java.lang.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.
      • 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 java.io.IOException
        Specified by:
        writeTo in interface com.google.protobuf.MessageLite
        Overrides:
        writeTo in class com.google.protobuf.GeneratedMessageV3
        Throws:
        java.io.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​(java.lang.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​(java.nio.ByteBuffer data)
                               throws com.google.protobuf.InvalidProtocolBufferException
        Throws:
        com.google.protobuf.InvalidProtocolBufferException
      • parseFrom

        public static OpDef parseFrom​(java.nio.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​(java.io.InputStream input)
                               throws java.io.IOException
        Throws:
        java.io.IOException
      • parseFrom

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

        public static OpDef parseDelimitedFrom​(java.io.InputStream input)
                                        throws java.io.IOException
        Throws:
        java.io.IOException
      • parseDelimitedFrom

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

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

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

        public OpDef.Builder newBuilderForType()
        Specified by:
        newBuilderForType in interface com.google.protobuf.Message
        Specified by:
        newBuilderForType in interface com.google.protobuf.MessageLite
      • 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