Class ApiDef

  • All Implemented Interfaces:
    Serializable, org.nd4j.shade.protobuf.Message, org.nd4j.shade.protobuf.MessageLite, org.nd4j.shade.protobuf.MessageLiteOrBuilder, org.nd4j.shade.protobuf.MessageOrBuilder, ApiDefOrBuilder

    public final class ApiDef
    extends org.nd4j.shade.protobuf.GeneratedMessageV3
    implements ApiDefOrBuilder
     Used to specify and override the default API & behavior in the
     generated code for client languages, from what you would get from
     the OpDef alone. There will be a set of ApiDefs that are common
     to all client languages, and another set per client language.
     The per-client-language ApiDefs will inherit values from the
     common ApiDefs which it can either replace or modify.
     We separate the API definition from the OpDef so we can evolve the
     API while remaining backwards compatible when interpretting old
     graphs.  Overrides go in an "api_def.pbtxt" file with a text-format
     ApiDefs message.
     WARNING: Be *very* careful changing the API for any existing op --
     you can change the semantics of existing code.  These changes may
     need to wait until a major release of TensorFlow to avoid breaking
     our compatibility promises.
     
    Protobuf type tensorflow.ApiDef
    See Also:
    Serialized Form
    • Method Detail

      • newInstance

        protected Object newInstance​(org.nd4j.shade.protobuf.GeneratedMessageV3.UnusedPrivateParameter unused)
        Overrides:
        newInstance in class org.nd4j.shade.protobuf.GeneratedMessageV3
      • getUnknownFields

        public final org.nd4j.shade.protobuf.UnknownFieldSet getUnknownFields()
        Specified by:
        getUnknownFields in interface org.nd4j.shade.protobuf.MessageOrBuilder
        Overrides:
        getUnknownFields in class org.nd4j.shade.protobuf.GeneratedMessageV3
      • getDescriptor

        public static final org.nd4j.shade.protobuf.Descriptors.Descriptor getDescriptor()
      • internalGetFieldAccessorTable

        protected org.nd4j.shade.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
        Specified by:
        internalGetFieldAccessorTable in class org.nd4j.shade.protobuf.GeneratedMessageV3
      • getGraphOpName

        public String getGraphOpName()
         Name of the op (in the OpDef) to specify the API for.
         
        string graph_op_name = 1;
        Specified by:
        getGraphOpName in interface ApiDefOrBuilder
        Returns:
        The graphOpName.
      • getGraphOpNameBytes

        public org.nd4j.shade.protobuf.ByteString getGraphOpNameBytes()
         Name of the op (in the OpDef) to specify the API for.
         
        string graph_op_name = 1;
        Specified by:
        getGraphOpNameBytes in interface ApiDefOrBuilder
        Returns:
        The bytes for graphOpName.
      • getVisibilityValue

        public int getVisibilityValue()
        .tensorflow.ApiDef.Visibility visibility = 2;
        Specified by:
        getVisibilityValue in interface ApiDefOrBuilder
        Returns:
        The enum numeric value on the wire for visibility.
      • getEndpointCount

        public int getEndpointCount()
        repeated .tensorflow.ApiDef.Endpoint endpoint = 3;
        Specified by:
        getEndpointCount in interface ApiDefOrBuilder
      • getInArgCount

        public int getInArgCount()
        repeated .tensorflow.ApiDef.Arg in_arg = 4;
        Specified by:
        getInArgCount in interface ApiDefOrBuilder
      • getOutArgCount

        public int getOutArgCount()
        repeated .tensorflow.ApiDef.Arg out_arg = 5;
        Specified by:
        getOutArgCount in interface ApiDefOrBuilder
      • getArgOrderList

        public org.nd4j.shade.protobuf.ProtocolStringList getArgOrderList()
         List of original in_arg names to specify new argument order.
         Length of arg_order should be either empty to keep current order
         or match size of in_arg.
         
        repeated string arg_order = 11;
        Specified by:
        getArgOrderList in interface ApiDefOrBuilder
        Returns:
        A list containing the argOrder.
      • getArgOrderCount

        public int getArgOrderCount()
         List of original in_arg names to specify new argument order.
         Length of arg_order should be either empty to keep current order
         or match size of in_arg.
         
        repeated string arg_order = 11;
        Specified by:
        getArgOrderCount in interface ApiDefOrBuilder
        Returns:
        The count of argOrder.
      • getArgOrder

        public String getArgOrder​(int index)
         List of original in_arg names to specify new argument order.
         Length of arg_order should be either empty to keep current order
         or match size of in_arg.
         
        repeated string arg_order = 11;
        Specified by:
        getArgOrder in interface ApiDefOrBuilder
        Parameters:
        index - The index of the element to return.
        Returns:
        The argOrder at the given index.
      • getArgOrderBytes

        public org.nd4j.shade.protobuf.ByteString getArgOrderBytes​(int index)
         List of original in_arg names to specify new argument order.
         Length of arg_order should be either empty to keep current order
         or match size of in_arg.
         
        repeated string arg_order = 11;
        Specified by:
        getArgOrderBytes in interface ApiDefOrBuilder
        Parameters:
        index - The index of the value to return.
        Returns:
        The bytes of the argOrder at the given index.
      • getAttrCount

        public int getAttrCount()
        repeated .tensorflow.ApiDef.Attr attr = 6;
        Specified by:
        getAttrCount in interface ApiDefOrBuilder
      • getSummary

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

        public org.nd4j.shade.protobuf.ByteString getSummaryBytes()
         One-line human-readable description of what the Op does.
         
        string summary = 7;
        Specified by:
        getSummaryBytes in interface ApiDefOrBuilder
        Returns:
        The bytes for summary.
      • getDescription

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

        public org.nd4j.shade.protobuf.ByteString getDescriptionBytes()
         Additional, longer human-readable description of what the Op does.
         
        string description = 8;
        Specified by:
        getDescriptionBytes in interface ApiDefOrBuilder
        Returns:
        The bytes for description.
      • getDescriptionPrefix

        public String getDescriptionPrefix()
         Modify an existing/inherited description by adding text to the beginning
         or end.
         
        string description_prefix = 9;
        Specified by:
        getDescriptionPrefix in interface ApiDefOrBuilder
        Returns:
        The descriptionPrefix.
      • getDescriptionPrefixBytes

        public org.nd4j.shade.protobuf.ByteString getDescriptionPrefixBytes()
         Modify an existing/inherited description by adding text to the beginning
         or end.
         
        string description_prefix = 9;
        Specified by:
        getDescriptionPrefixBytes in interface ApiDefOrBuilder
        Returns:
        The bytes for descriptionPrefix.
      • getDescriptionSuffixBytes

        public org.nd4j.shade.protobuf.ByteString getDescriptionSuffixBytes()
        string description_suffix = 10;
        Specified by:
        getDescriptionSuffixBytes in interface ApiDefOrBuilder
        Returns:
        The bytes for descriptionSuffix.
      • isInitialized

        public final boolean isInitialized()
        Specified by:
        isInitialized in interface org.nd4j.shade.protobuf.MessageLiteOrBuilder
        Overrides:
        isInitialized in class org.nd4j.shade.protobuf.GeneratedMessageV3
      • writeTo

        public void writeTo​(org.nd4j.shade.protobuf.CodedOutputStream output)
                     throws IOException
        Specified by:
        writeTo in interface org.nd4j.shade.protobuf.MessageLite
        Overrides:
        writeTo in class org.nd4j.shade.protobuf.GeneratedMessageV3
        Throws:
        IOException
      • getSerializedSize

        public int getSerializedSize()
        Specified by:
        getSerializedSize in interface org.nd4j.shade.protobuf.MessageLite
        Overrides:
        getSerializedSize in class org.nd4j.shade.protobuf.GeneratedMessageV3
      • equals

        public boolean equals​(Object obj)
        Specified by:
        equals in interface org.nd4j.shade.protobuf.Message
        Overrides:
        equals in class org.nd4j.shade.protobuf.AbstractMessage
      • hashCode

        public int hashCode()
        Specified by:
        hashCode in interface org.nd4j.shade.protobuf.Message
        Overrides:
        hashCode in class org.nd4j.shade.protobuf.AbstractMessage
      • parseFrom

        public static ApiDef parseFrom​(ByteBuffer data)
                                throws org.nd4j.shade.protobuf.InvalidProtocolBufferException
        Throws:
        org.nd4j.shade.protobuf.InvalidProtocolBufferException
      • parseFrom

        public static ApiDef parseFrom​(ByteBuffer data,
                                       org.nd4j.shade.protobuf.ExtensionRegistryLite extensionRegistry)
                                throws org.nd4j.shade.protobuf.InvalidProtocolBufferException
        Throws:
        org.nd4j.shade.protobuf.InvalidProtocolBufferException
      • parseFrom

        public static ApiDef parseFrom​(org.nd4j.shade.protobuf.ByteString data)
                                throws org.nd4j.shade.protobuf.InvalidProtocolBufferException
        Throws:
        org.nd4j.shade.protobuf.InvalidProtocolBufferException
      • parseFrom

        public static ApiDef parseFrom​(org.nd4j.shade.protobuf.ByteString data,
                                       org.nd4j.shade.protobuf.ExtensionRegistryLite extensionRegistry)
                                throws org.nd4j.shade.protobuf.InvalidProtocolBufferException
        Throws:
        org.nd4j.shade.protobuf.InvalidProtocolBufferException
      • parseFrom

        public static ApiDef parseFrom​(byte[] data)
                                throws org.nd4j.shade.protobuf.InvalidProtocolBufferException
        Throws:
        org.nd4j.shade.protobuf.InvalidProtocolBufferException
      • parseFrom

        public static ApiDef parseFrom​(byte[] data,
                                       org.nd4j.shade.protobuf.ExtensionRegistryLite extensionRegistry)
                                throws org.nd4j.shade.protobuf.InvalidProtocolBufferException
        Throws:
        org.nd4j.shade.protobuf.InvalidProtocolBufferException
      • parseFrom

        public static ApiDef parseFrom​(org.nd4j.shade.protobuf.CodedInputStream input,
                                       org.nd4j.shade.protobuf.ExtensionRegistryLite extensionRegistry)
                                throws IOException
        Throws:
        IOException
      • newBuilderForType

        public ApiDef.Builder newBuilderForType()
        Specified by:
        newBuilderForType in interface org.nd4j.shade.protobuf.Message
        Specified by:
        newBuilderForType in interface org.nd4j.shade.protobuf.MessageLite
      • toBuilder

        public ApiDef.Builder toBuilder()
        Specified by:
        toBuilder in interface org.nd4j.shade.protobuf.Message
        Specified by:
        toBuilder in interface org.nd4j.shade.protobuf.MessageLite
      • newBuilderForType

        protected ApiDef.Builder newBuilderForType​(org.nd4j.shade.protobuf.GeneratedMessageV3.BuilderParent parent)
        Specified by:
        newBuilderForType in class org.nd4j.shade.protobuf.GeneratedMessageV3
      • getDefaultInstance

        public static ApiDef getDefaultInstance()
      • parser

        public static org.nd4j.shade.protobuf.Parser<ApiDef> parser()
      • getParserForType

        public org.nd4j.shade.protobuf.Parser<ApiDef> getParserForType()
        Specified by:
        getParserForType in interface org.nd4j.shade.protobuf.Message
        Specified by:
        getParserForType in interface org.nd4j.shade.protobuf.MessageLite
        Overrides:
        getParserForType in class org.nd4j.shade.protobuf.GeneratedMessageV3
      • getDefaultInstanceForType

        public ApiDef getDefaultInstanceForType()
        Specified by:
        getDefaultInstanceForType in interface org.nd4j.shade.protobuf.MessageLiteOrBuilder
        Specified by:
        getDefaultInstanceForType in interface org.nd4j.shade.protobuf.MessageOrBuilder