Package onnx

Class OnnxOperators.OperatorSetProto.Builder

  • All Implemented Interfaces:
    Cloneable, OnnxOperators.OperatorSetProtoOrBuilder, org.nd4j.shade.protobuf.Message.Builder, org.nd4j.shade.protobuf.MessageLite.Builder, org.nd4j.shade.protobuf.MessageLiteOrBuilder, org.nd4j.shade.protobuf.MessageOrBuilder
    Enclosing class:
    OnnxOperators.OperatorSetProto

    public static final class OnnxOperators.OperatorSetProto.Builder
    extends org.nd4j.shade.protobuf.GeneratedMessageV3.Builder<OnnxOperators.OperatorSetProto.Builder>
    implements OnnxOperators.OperatorSetProtoOrBuilder
     An OperatorSetProto represents an immutable set of immutable operator
     specifications.
     The domain of the set (OperatorSetProto.domain) is a reverse-DNS name
     that disambiguates operator sets defined by independent entities.
     The version of the set (opset_version) is a monotonically increasing
     integer that indicates changes to the membership of the operator set.
     Operator sets are uniquely identified by a two part identifier (domain, opset_version)
     Like ModelProto, OperatorSetProto is intended as a top-level file/wire format,
     and thus has the standard format headers in addition to the operator set information.
     
    Protobuf type onnx.OperatorSetProto
    • Method Detail

      • 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.Builder<OnnxOperators.OperatorSetProto.Builder>
      • getDescriptorForType

        public org.nd4j.shade.protobuf.Descriptors.Descriptor getDescriptorForType()
        Specified by:
        getDescriptorForType in interface org.nd4j.shade.protobuf.Message.Builder
        Specified by:
        getDescriptorForType in interface org.nd4j.shade.protobuf.MessageOrBuilder
        Overrides:
        getDescriptorForType in class org.nd4j.shade.protobuf.GeneratedMessageV3.Builder<OnnxOperators.OperatorSetProto.Builder>
      • getDefaultInstanceForType

        public OnnxOperators.OperatorSetProto getDefaultInstanceForType()
        Specified by:
        getDefaultInstanceForType in interface org.nd4j.shade.protobuf.MessageLiteOrBuilder
        Specified by:
        getDefaultInstanceForType in interface org.nd4j.shade.protobuf.MessageOrBuilder
      • build

        public OnnxOperators.OperatorSetProto build()
        Specified by:
        build in interface org.nd4j.shade.protobuf.Message.Builder
        Specified by:
        build in interface org.nd4j.shade.protobuf.MessageLite.Builder
      • buildPartial

        public OnnxOperators.OperatorSetProto buildPartial()
        Specified by:
        buildPartial in interface org.nd4j.shade.protobuf.Message.Builder
        Specified by:
        buildPartial in interface org.nd4j.shade.protobuf.MessageLite.Builder
      • isInitialized

        public final boolean isInitialized()
        Specified by:
        isInitialized in interface org.nd4j.shade.protobuf.MessageLiteOrBuilder
        Overrides:
        isInitialized in class org.nd4j.shade.protobuf.GeneratedMessageV3.Builder<OnnxOperators.OperatorSetProto.Builder>
      • mergeFrom

        public OnnxOperators.OperatorSetProto.Builder mergeFrom​(org.nd4j.shade.protobuf.CodedInputStream input,
                                                                org.nd4j.shade.protobuf.ExtensionRegistryLite extensionRegistry)
                                                         throws IOException
        Specified by:
        mergeFrom in interface org.nd4j.shade.protobuf.Message.Builder
        Specified by:
        mergeFrom in interface org.nd4j.shade.protobuf.MessageLite.Builder
        Overrides:
        mergeFrom in class org.nd4j.shade.protobuf.AbstractMessage.Builder<OnnxOperators.OperatorSetProto.Builder>
        Throws:
        IOException
      • getMagic

        public String getMagic()
         All OperatorSetProtos start with a distingushed byte sequence to disambiguate
         protobuf files containing OperatorSets from other content.
         This field MUST be "ONNXOPSET"
         This field MUST be present in this version of the IR
         
        string magic = 1;
        Specified by:
        getMagic in interface OnnxOperators.OperatorSetProtoOrBuilder
        Returns:
        The magic.
      • getMagicBytes

        public org.nd4j.shade.protobuf.ByteString getMagicBytes()
         All OperatorSetProtos start with a distingushed byte sequence to disambiguate
         protobuf files containing OperatorSets from other content.
         This field MUST be "ONNXOPSET"
         This field MUST be present in this version of the IR
         
        string magic = 1;
        Specified by:
        getMagicBytes in interface OnnxOperators.OperatorSetProtoOrBuilder
        Returns:
        The bytes for magic.
      • setMagic

        public OnnxOperators.OperatorSetProto.Builder setMagic​(String value)
         All OperatorSetProtos start with a distingushed byte sequence to disambiguate
         protobuf files containing OperatorSets from other content.
         This field MUST be "ONNXOPSET"
         This field MUST be present in this version of the IR
         
        string magic = 1;
        Parameters:
        value - The magic to set.
        Returns:
        This builder for chaining.
      • clearMagic

        public OnnxOperators.OperatorSetProto.Builder clearMagic()
         All OperatorSetProtos start with a distingushed byte sequence to disambiguate
         protobuf files containing OperatorSets from other content.
         This field MUST be "ONNXOPSET"
         This field MUST be present in this version of the IR
         
        string magic = 1;
        Returns:
        This builder for chaining.
      • setMagicBytes

        public OnnxOperators.OperatorSetProto.Builder setMagicBytes​(org.nd4j.shade.protobuf.ByteString value)
         All OperatorSetProtos start with a distingushed byte sequence to disambiguate
         protobuf files containing OperatorSets from other content.
         This field MUST be "ONNXOPSET"
         This field MUST be present in this version of the IR
         
        string magic = 1;
        Parameters:
        value - The bytes for magic to set.
        Returns:
        This builder for chaining.
      • getIrVersion

        public long getIrVersion()
         All OperatorSetProtos indicate the version of the IR syntax and semantics
         they adhere to. It is always IR_VERSION.
         This field MUST be present in this version of the IR
         
        int64 ir_version = 2;
        Specified by:
        getIrVersion in interface OnnxOperators.OperatorSetProtoOrBuilder
        Returns:
        The irVersion.
      • setIrVersion

        public OnnxOperators.OperatorSetProto.Builder setIrVersion​(long value)
         All OperatorSetProtos indicate the version of the IR syntax and semantics
         they adhere to. It is always IR_VERSION.
         This field MUST be present in this version of the IR
         
        int64 ir_version = 2;
        Parameters:
        value - The irVersion to set.
        Returns:
        This builder for chaining.
      • clearIrVersion

        public OnnxOperators.OperatorSetProto.Builder clearIrVersion()
         All OperatorSetProtos indicate the version of the IR syntax and semantics
         they adhere to. It is always IR_VERSION.
         This field MUST be present in this version of the IR
         
        int64 ir_version = 2;
        Returns:
        This builder for chaining.
      • getIrVersionPrereleaseBytes

        public org.nd4j.shade.protobuf.ByteString getIrVersionPrereleaseBytes()
         The prerelease component of the SemVer of the IR.
         This field MAY be absent in this version of the IR
         
        string ir_version_prerelease = 3;
        Specified by:
        getIrVersionPrereleaseBytes in interface OnnxOperators.OperatorSetProtoOrBuilder
        Returns:
        The bytes for irVersionPrerelease.
      • setIrVersionPrerelease

        public OnnxOperators.OperatorSetProto.Builder setIrVersionPrerelease​(String value)
         The prerelease component of the SemVer of the IR.
         This field MAY be absent in this version of the IR
         
        string ir_version_prerelease = 3;
        Parameters:
        value - The irVersionPrerelease to set.
        Returns:
        This builder for chaining.
      • clearIrVersionPrerelease

        public OnnxOperators.OperatorSetProto.Builder clearIrVersionPrerelease()
         The prerelease component of the SemVer of the IR.
         This field MAY be absent in this version of the IR
         
        string ir_version_prerelease = 3;
        Returns:
        This builder for chaining.
      • setIrVersionPrereleaseBytes

        public OnnxOperators.OperatorSetProto.Builder setIrVersionPrereleaseBytes​(org.nd4j.shade.protobuf.ByteString value)
         The prerelease component of the SemVer of the IR.
         This field MAY be absent in this version of the IR
         
        string ir_version_prerelease = 3;
        Parameters:
        value - The bytes for irVersionPrerelease to set.
        Returns:
        This builder for chaining.
      • getIrBuildMetadataBytes

        public org.nd4j.shade.protobuf.ByteString getIrBuildMetadataBytes()
         The build metadata component of the SemVer of the IR.
         This field MAY be absent in this version of the IR
         
        string ir_build_metadata = 7;
        Specified by:
        getIrBuildMetadataBytes in interface OnnxOperators.OperatorSetProtoOrBuilder
        Returns:
        The bytes for irBuildMetadata.
      • setIrBuildMetadata

        public OnnxOperators.OperatorSetProto.Builder setIrBuildMetadata​(String value)
         The build metadata component of the SemVer of the IR.
         This field MAY be absent in this version of the IR
         
        string ir_build_metadata = 7;
        Parameters:
        value - The irBuildMetadata to set.
        Returns:
        This builder for chaining.
      • clearIrBuildMetadata

        public OnnxOperators.OperatorSetProto.Builder clearIrBuildMetadata()
         The build metadata component of the SemVer of the IR.
         This field MAY be absent in this version of the IR
         
        string ir_build_metadata = 7;
        Returns:
        This builder for chaining.
      • setIrBuildMetadataBytes

        public OnnxOperators.OperatorSetProto.Builder setIrBuildMetadataBytes​(org.nd4j.shade.protobuf.ByteString value)
         The build metadata component of the SemVer of the IR.
         This field MAY be absent in this version of the IR
         
        string ir_build_metadata = 7;
        Parameters:
        value - The bytes for irBuildMetadata to set.
        Returns:
        This builder for chaining.
      • getDomainBytes

        public org.nd4j.shade.protobuf.ByteString getDomainBytes()
         Domain name of the operator set, in reverse DNS form (e.g., com.acme.dnnops).
         
        string domain = 4;
        Specified by:
        getDomainBytes in interface OnnxOperators.OperatorSetProtoOrBuilder
        Returns:
        The bytes for domain.
      • setDomain

        public OnnxOperators.OperatorSetProto.Builder setDomain​(String value)
         Domain name of the operator set, in reverse DNS form (e.g., com.acme.dnnops).
         
        string domain = 4;
        Parameters:
        value - The domain to set.
        Returns:
        This builder for chaining.
      • clearDomain

        public OnnxOperators.OperatorSetProto.Builder clearDomain()
         Domain name of the operator set, in reverse DNS form (e.g., com.acme.dnnops).
         
        string domain = 4;
        Returns:
        This builder for chaining.
      • setDomainBytes

        public OnnxOperators.OperatorSetProto.Builder setDomainBytes​(org.nd4j.shade.protobuf.ByteString value)
         Domain name of the operator set, in reverse DNS form (e.g., com.acme.dnnops).
         
        string domain = 4;
        Parameters:
        value - The bytes for domain to set.
        Returns:
        This builder for chaining.
      • getOpsetVersion

        public long getOpsetVersion()
         The version of the set of operators. This is a simple int value
         that is monotonically increasing as new versions of the operator set
         are published. All operators in this set MUST have since_version
         <= opset_version.
         
        int64 opset_version = 5;
        Specified by:
        getOpsetVersion in interface OnnxOperators.OperatorSetProtoOrBuilder
        Returns:
        The opsetVersion.
      • setOpsetVersion

        public OnnxOperators.OperatorSetProto.Builder setOpsetVersion​(long value)
         The version of the set of operators. This is a simple int value
         that is monotonically increasing as new versions of the operator set
         are published. All operators in this set MUST have since_version
         <= opset_version.
         
        int64 opset_version = 5;
        Parameters:
        value - The opsetVersion to set.
        Returns:
        This builder for chaining.
      • clearOpsetVersion

        public OnnxOperators.OperatorSetProto.Builder clearOpsetVersion()
         The version of the set of operators. This is a simple int value
         that is monotonically increasing as new versions of the operator set
         are published. All operators in this set MUST have since_version
         <= opset_version.
         
        int64 opset_version = 5;
        Returns:
        This builder for chaining.
      • getDocStringBytes

        public org.nd4j.shade.protobuf.ByteString getDocStringBytes()
         A human-readable documentation for this set of operators. Markdown is allowed.
         
        string doc_string = 6;
        Specified by:
        getDocStringBytes in interface OnnxOperators.OperatorSetProtoOrBuilder
        Returns:
        The bytes for docString.
      • setDocString

        public OnnxOperators.OperatorSetProto.Builder setDocString​(String value)
         A human-readable documentation for this set of operators. Markdown is allowed.
         
        string doc_string = 6;
        Parameters:
        value - The docString to set.
        Returns:
        This builder for chaining.
      • clearDocString

        public OnnxOperators.OperatorSetProto.Builder clearDocString()
         A human-readable documentation for this set of operators. Markdown is allowed.
         
        string doc_string = 6;
        Returns:
        This builder for chaining.
      • setDocStringBytes

        public OnnxOperators.OperatorSetProto.Builder setDocStringBytes​(org.nd4j.shade.protobuf.ByteString value)
         A human-readable documentation for this set of operators. Markdown is allowed.
         
        string doc_string = 6;
        Parameters:
        value - The bytes for docString to set.
        Returns:
        This builder for chaining.
      • getOperatorCount

        public int getOperatorCount()
         The operators specified by this operator set.
         The (name, version) MUST be unique across all OperatorProtos in operator
         
        repeated .onnx.OperatorProto operator = 8;
        Specified by:
        getOperatorCount in interface OnnxOperators.OperatorSetProtoOrBuilder
      • clearOperator

        public OnnxOperators.OperatorSetProto.Builder clearOperator()
         The operators specified by this operator set.
         The (name, version) MUST be unique across all OperatorProtos in operator
         
        repeated .onnx.OperatorProto operator = 8;
      • removeOperator

        public OnnxOperators.OperatorSetProto.Builder removeOperator​(int index)
         The operators specified by this operator set.
         The (name, version) MUST be unique across all OperatorProtos in operator
         
        repeated .onnx.OperatorProto operator = 8;
      • getOperatorBuilder

        public OnnxOperators.OperatorProto.Builder getOperatorBuilder​(int index)
         The operators specified by this operator set.
         The (name, version) MUST be unique across all OperatorProtos in operator
         
        repeated .onnx.OperatorProto operator = 8;
      • addOperatorBuilder

        public OnnxOperators.OperatorProto.Builder addOperatorBuilder()
         The operators specified by this operator set.
         The (name, version) MUST be unique across all OperatorProtos in operator
         
        repeated .onnx.OperatorProto operator = 8;
      • addOperatorBuilder

        public OnnxOperators.OperatorProto.Builder addOperatorBuilder​(int index)
         The operators specified by this operator set.
         The (name, version) MUST be unique across all OperatorProtos in operator
         
        repeated .onnx.OperatorProto operator = 8;
      • getOperatorBuilderList

        public List<OnnxOperators.OperatorProto.Builder> getOperatorBuilderList()
         The operators specified by this operator set.
         The (name, version) MUST be unique across all OperatorProtos in operator
         
        repeated .onnx.OperatorProto operator = 8;
      • getFunctionsCount

        public int getFunctionsCount()
         The functions specified by this operator set.
         The (name, version) MUST be unique across all OperatorProtos/FunctionProtos in operator/functions
         
        repeated .onnx.FunctionProto functions = 9;
        Specified by:
        getFunctionsCount in interface OnnxOperators.OperatorSetProtoOrBuilder
      • setFunctions

        public OnnxOperators.OperatorSetProto.Builder setFunctions​(int index,
                                                                   Onnx.FunctionProto value)
         The functions specified by this operator set.
         The (name, version) MUST be unique across all OperatorProtos/FunctionProtos in operator/functions
         
        repeated .onnx.FunctionProto functions = 9;
      • setFunctions

        public OnnxOperators.OperatorSetProto.Builder setFunctions​(int index,
                                                                   Onnx.FunctionProto.Builder builderForValue)
         The functions specified by this operator set.
         The (name, version) MUST be unique across all OperatorProtos/FunctionProtos in operator/functions
         
        repeated .onnx.FunctionProto functions = 9;
      • addFunctions

        public OnnxOperators.OperatorSetProto.Builder addFunctions​(Onnx.FunctionProto value)
         The functions specified by this operator set.
         The (name, version) MUST be unique across all OperatorProtos/FunctionProtos in operator/functions
         
        repeated .onnx.FunctionProto functions = 9;
      • addFunctions

        public OnnxOperators.OperatorSetProto.Builder addFunctions​(int index,
                                                                   Onnx.FunctionProto value)
         The functions specified by this operator set.
         The (name, version) MUST be unique across all OperatorProtos/FunctionProtos in operator/functions
         
        repeated .onnx.FunctionProto functions = 9;
      • addFunctions

        public OnnxOperators.OperatorSetProto.Builder addFunctions​(int index,
                                                                   Onnx.FunctionProto.Builder builderForValue)
         The functions specified by this operator set.
         The (name, version) MUST be unique across all OperatorProtos/FunctionProtos in operator/functions
         
        repeated .onnx.FunctionProto functions = 9;
      • addAllFunctions

        public OnnxOperators.OperatorSetProto.Builder addAllFunctions​(Iterable<? extends Onnx.FunctionProto> values)
         The functions specified by this operator set.
         The (name, version) MUST be unique across all OperatorProtos/FunctionProtos in operator/functions
         
        repeated .onnx.FunctionProto functions = 9;
      • clearFunctions

        public OnnxOperators.OperatorSetProto.Builder clearFunctions()
         The functions specified by this operator set.
         The (name, version) MUST be unique across all OperatorProtos/FunctionProtos in operator/functions
         
        repeated .onnx.FunctionProto functions = 9;
      • removeFunctions

        public OnnxOperators.OperatorSetProto.Builder removeFunctions​(int index)
         The functions specified by this operator set.
         The (name, version) MUST be unique across all OperatorProtos/FunctionProtos in operator/functions
         
        repeated .onnx.FunctionProto functions = 9;
      • getFunctionsBuilder

        public Onnx.FunctionProto.Builder getFunctionsBuilder​(int index)
         The functions specified by this operator set.
         The (name, version) MUST be unique across all OperatorProtos/FunctionProtos in operator/functions
         
        repeated .onnx.FunctionProto functions = 9;
      • addFunctionsBuilder

        public Onnx.FunctionProto.Builder addFunctionsBuilder()
         The functions specified by this operator set.
         The (name, version) MUST be unique across all OperatorProtos/FunctionProtos in operator/functions
         
        repeated .onnx.FunctionProto functions = 9;
      • addFunctionsBuilder

        public Onnx.FunctionProto.Builder addFunctionsBuilder​(int index)
         The functions specified by this operator set.
         The (name, version) MUST be unique across all OperatorProtos/FunctionProtos in operator/functions
         
        repeated .onnx.FunctionProto functions = 9;
      • getFunctionsBuilderList

        public List<Onnx.FunctionProto.Builder> getFunctionsBuilderList()
         The functions specified by this operator set.
         The (name, version) MUST be unique across all OperatorProtos/FunctionProtos in operator/functions
         
        repeated .onnx.FunctionProto functions = 9;