Class WhileContextDef.Builder

  • All Implemented Interfaces:
    Cloneable, org.nd4j.shade.protobuf.Message.Builder, org.nd4j.shade.protobuf.MessageLite.Builder, org.nd4j.shade.protobuf.MessageLiteOrBuilder, org.nd4j.shade.protobuf.MessageOrBuilder, WhileContextDefOrBuilder
    Enclosing class:
    WhileContextDef

    public static final class WhileContextDef.Builder
    extends org.nd4j.shade.protobuf.GeneratedMessageV3.Builder<WhileContextDef.Builder>
    implements WhileContextDefOrBuilder
     Protocol buffer representing a WhileContext object.
     
    Protobuf type tensorflow.WhileContextDef
    • 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<WhileContextDef.Builder>
      • clear

        public WhileContextDef.Builder clear()
        Specified by:
        clear in interface org.nd4j.shade.protobuf.Message.Builder
        Specified by:
        clear in interface org.nd4j.shade.protobuf.MessageLite.Builder
        Overrides:
        clear in class org.nd4j.shade.protobuf.GeneratedMessageV3.Builder<WhileContextDef.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<WhileContextDef.Builder>
      • getDefaultInstanceForType

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

        public WhileContextDef 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 WhileContextDef buildPartial()
        Specified by:
        buildPartial in interface org.nd4j.shade.protobuf.Message.Builder
        Specified by:
        buildPartial in interface org.nd4j.shade.protobuf.MessageLite.Builder
      • clone

        public WhileContextDef.Builder clone()
        Specified by:
        clone in interface org.nd4j.shade.protobuf.Message.Builder
        Specified by:
        clone in interface org.nd4j.shade.protobuf.MessageLite.Builder
        Overrides:
        clone in class org.nd4j.shade.protobuf.GeneratedMessageV3.Builder<WhileContextDef.Builder>
      • setField

        public WhileContextDef.Builder setField​(org.nd4j.shade.protobuf.Descriptors.FieldDescriptor field,
                                                Object value)
        Specified by:
        setField in interface org.nd4j.shade.protobuf.Message.Builder
        Overrides:
        setField in class org.nd4j.shade.protobuf.GeneratedMessageV3.Builder<WhileContextDef.Builder>
      • clearField

        public WhileContextDef.Builder clearField​(org.nd4j.shade.protobuf.Descriptors.FieldDescriptor field)
        Specified by:
        clearField in interface org.nd4j.shade.protobuf.Message.Builder
        Overrides:
        clearField in class org.nd4j.shade.protobuf.GeneratedMessageV3.Builder<WhileContextDef.Builder>
      • clearOneof

        public WhileContextDef.Builder clearOneof​(org.nd4j.shade.protobuf.Descriptors.OneofDescriptor oneof)
        Specified by:
        clearOneof in interface org.nd4j.shade.protobuf.Message.Builder
        Overrides:
        clearOneof in class org.nd4j.shade.protobuf.GeneratedMessageV3.Builder<WhileContextDef.Builder>
      • setRepeatedField

        public WhileContextDef.Builder setRepeatedField​(org.nd4j.shade.protobuf.Descriptors.FieldDescriptor field,
                                                        int index,
                                                        Object value)
        Specified by:
        setRepeatedField in interface org.nd4j.shade.protobuf.Message.Builder
        Overrides:
        setRepeatedField in class org.nd4j.shade.protobuf.GeneratedMessageV3.Builder<WhileContextDef.Builder>
      • addRepeatedField

        public WhileContextDef.Builder addRepeatedField​(org.nd4j.shade.protobuf.Descriptors.FieldDescriptor field,
                                                        Object value)
        Specified by:
        addRepeatedField in interface org.nd4j.shade.protobuf.Message.Builder
        Overrides:
        addRepeatedField in class org.nd4j.shade.protobuf.GeneratedMessageV3.Builder<WhileContextDef.Builder>
      • mergeFrom

        public WhileContextDef.Builder mergeFrom​(org.nd4j.shade.protobuf.Message other)
        Specified by:
        mergeFrom in interface org.nd4j.shade.protobuf.Message.Builder
        Overrides:
        mergeFrom in class org.nd4j.shade.protobuf.AbstractMessage.Builder<WhileContextDef.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<WhileContextDef.Builder>
      • mergeFrom

        public WhileContextDef.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<WhileContextDef.Builder>
        Throws:
        IOException
      • getContextNameBytes

        public org.nd4j.shade.protobuf.ByteString getContextNameBytes()
         Name of the context.
         
        string context_name = 1;
        Specified by:
        getContextNameBytes in interface WhileContextDefOrBuilder
        Returns:
        The bytes for contextName.
      • setContextName

        public WhileContextDef.Builder setContextName​(String value)
         Name of the context.
         
        string context_name = 1;
        Parameters:
        value - The contextName to set.
        Returns:
        This builder for chaining.
      • clearContextName

        public WhileContextDef.Builder clearContextName()
         Name of the context.
         
        string context_name = 1;
        Returns:
        This builder for chaining.
      • setContextNameBytes

        public WhileContextDef.Builder setContextNameBytes​(org.nd4j.shade.protobuf.ByteString value)
         Name of the context.
         
        string context_name = 1;
        Parameters:
        value - The bytes for contextName to set.
        Returns:
        This builder for chaining.
      • getParallelIterations

        public int getParallelIterations()
         The number of iterations allowed to run in parallel.
         
        int32 parallel_iterations = 2;
        Specified by:
        getParallelIterations in interface WhileContextDefOrBuilder
        Returns:
        The parallelIterations.
      • setParallelIterations

        public WhileContextDef.Builder setParallelIterations​(int value)
         The number of iterations allowed to run in parallel.
         
        int32 parallel_iterations = 2;
        Parameters:
        value - The parallelIterations to set.
        Returns:
        This builder for chaining.
      • clearParallelIterations

        public WhileContextDef.Builder clearParallelIterations()
         The number of iterations allowed to run in parallel.
         
        int32 parallel_iterations = 2;
        Returns:
        This builder for chaining.
      • getBackProp

        public boolean getBackProp()
         Whether backprop is enabled for this while loop.
         
        bool back_prop = 3;
        Specified by:
        getBackProp in interface WhileContextDefOrBuilder
        Returns:
        The backProp.
      • setBackProp

        public WhileContextDef.Builder setBackProp​(boolean value)
         Whether backprop is enabled for this while loop.
         
        bool back_prop = 3;
        Parameters:
        value - The backProp to set.
        Returns:
        This builder for chaining.
      • clearBackProp

        public WhileContextDef.Builder clearBackProp()
         Whether backprop is enabled for this while loop.
         
        bool back_prop = 3;
        Returns:
        This builder for chaining.
      • getSwapMemory

        public boolean getSwapMemory()
         Whether GPU-CPU memory swap is enabled for this loop.
         
        bool swap_memory = 4;
        Specified by:
        getSwapMemory in interface WhileContextDefOrBuilder
        Returns:
        The swapMemory.
      • setSwapMemory

        public WhileContextDef.Builder setSwapMemory​(boolean value)
         Whether GPU-CPU memory swap is enabled for this loop.
         
        bool swap_memory = 4;
        Parameters:
        value - The swapMemory to set.
        Returns:
        This builder for chaining.
      • clearSwapMemory

        public WhileContextDef.Builder clearSwapMemory()
         Whether GPU-CPU memory swap is enabled for this loop.
         
        bool swap_memory = 4;
        Returns:
        This builder for chaining.
      • getPivotNameBytes

        public org.nd4j.shade.protobuf.ByteString getPivotNameBytes()
         Name of the pivot tensor.
         
        string pivot_name = 5;
        Specified by:
        getPivotNameBytes in interface WhileContextDefOrBuilder
        Returns:
        The bytes for pivotName.
      • setPivotName

        public WhileContextDef.Builder setPivotName​(String value)
         Name of the pivot tensor.
         
        string pivot_name = 5;
        Parameters:
        value - The pivotName to set.
        Returns:
        This builder for chaining.
      • clearPivotName

        public WhileContextDef.Builder clearPivotName()
         Name of the pivot tensor.
         
        string pivot_name = 5;
        Returns:
        This builder for chaining.
      • setPivotNameBytes

        public WhileContextDef.Builder setPivotNameBytes​(org.nd4j.shade.protobuf.ByteString value)
         Name of the pivot tensor.
         
        string pivot_name = 5;
        Parameters:
        value - The bytes for pivotName to set.
        Returns:
        This builder for chaining.
      • getPivotForPredNameBytes

        public org.nd4j.shade.protobuf.ByteString getPivotForPredNameBytes()
         Name of the pivot_for_pred tensor.
         
        string pivot_for_pred_name = 6;
        Specified by:
        getPivotForPredNameBytes in interface WhileContextDefOrBuilder
        Returns:
        The bytes for pivotForPredName.
      • setPivotForPredName

        public WhileContextDef.Builder setPivotForPredName​(String value)
         Name of the pivot_for_pred tensor.
         
        string pivot_for_pred_name = 6;
        Parameters:
        value - The pivotForPredName to set.
        Returns:
        This builder for chaining.
      • clearPivotForPredName

        public WhileContextDef.Builder clearPivotForPredName()
         Name of the pivot_for_pred tensor.
         
        string pivot_for_pred_name = 6;
        Returns:
        This builder for chaining.
      • setPivotForPredNameBytes

        public WhileContextDef.Builder setPivotForPredNameBytes​(org.nd4j.shade.protobuf.ByteString value)
         Name of the pivot_for_pred tensor.
         
        string pivot_for_pred_name = 6;
        Parameters:
        value - The bytes for pivotForPredName to set.
        Returns:
        This builder for chaining.
      • getPivotForBodyNameBytes

        public org.nd4j.shade.protobuf.ByteString getPivotForBodyNameBytes()
         Name of the pivot_for_body tensor.
         
        string pivot_for_body_name = 7;
        Specified by:
        getPivotForBodyNameBytes in interface WhileContextDefOrBuilder
        Returns:
        The bytes for pivotForBodyName.
      • setPivotForBodyName

        public WhileContextDef.Builder setPivotForBodyName​(String value)
         Name of the pivot_for_body tensor.
         
        string pivot_for_body_name = 7;
        Parameters:
        value - The pivotForBodyName to set.
        Returns:
        This builder for chaining.
      • clearPivotForBodyName

        public WhileContextDef.Builder clearPivotForBodyName()
         Name of the pivot_for_body tensor.
         
        string pivot_for_body_name = 7;
        Returns:
        This builder for chaining.
      • setPivotForBodyNameBytes

        public WhileContextDef.Builder setPivotForBodyNameBytes​(org.nd4j.shade.protobuf.ByteString value)
         Name of the pivot_for_body tensor.
         
        string pivot_for_body_name = 7;
        Parameters:
        value - The bytes for pivotForBodyName to set.
        Returns:
        This builder for chaining.
      • getLoopExitNamesList

        public org.nd4j.shade.protobuf.ProtocolStringList getLoopExitNamesList()
         List of names for exit tensors.
         
        repeated string loop_exit_names = 8;
        Specified by:
        getLoopExitNamesList in interface WhileContextDefOrBuilder
        Returns:
        A list containing the loopExitNames.
      • getLoopExitNamesCount

        public int getLoopExitNamesCount()
         List of names for exit tensors.
         
        repeated string loop_exit_names = 8;
        Specified by:
        getLoopExitNamesCount in interface WhileContextDefOrBuilder
        Returns:
        The count of loopExitNames.
      • getLoopExitNames

        public String getLoopExitNames​(int index)
         List of names for exit tensors.
         
        repeated string loop_exit_names = 8;
        Specified by:
        getLoopExitNames in interface WhileContextDefOrBuilder
        Parameters:
        index - The index of the element to return.
        Returns:
        The loopExitNames at the given index.
      • getLoopExitNamesBytes

        public org.nd4j.shade.protobuf.ByteString getLoopExitNamesBytes​(int index)
         List of names for exit tensors.
         
        repeated string loop_exit_names = 8;
        Specified by:
        getLoopExitNamesBytes in interface WhileContextDefOrBuilder
        Parameters:
        index - The index of the value to return.
        Returns:
        The bytes of the loopExitNames at the given index.
      • setLoopExitNames

        public WhileContextDef.Builder setLoopExitNames​(int index,
                                                        String value)
         List of names for exit tensors.
         
        repeated string loop_exit_names = 8;
        Parameters:
        index - The index to set the value at.
        value - The loopExitNames to set.
        Returns:
        This builder for chaining.
      • addLoopExitNames

        public WhileContextDef.Builder addLoopExitNames​(String value)
         List of names for exit tensors.
         
        repeated string loop_exit_names = 8;
        Parameters:
        value - The loopExitNames to add.
        Returns:
        This builder for chaining.
      • addAllLoopExitNames

        public WhileContextDef.Builder addAllLoopExitNames​(Iterable<String> values)
         List of names for exit tensors.
         
        repeated string loop_exit_names = 8;
        Parameters:
        values - The loopExitNames to add.
        Returns:
        This builder for chaining.
      • clearLoopExitNames

        public WhileContextDef.Builder clearLoopExitNames()
         List of names for exit tensors.
         
        repeated string loop_exit_names = 8;
        Returns:
        This builder for chaining.
      • addLoopExitNamesBytes

        public WhileContextDef.Builder addLoopExitNamesBytes​(org.nd4j.shade.protobuf.ByteString value)
         List of names for exit tensors.
         
        repeated string loop_exit_names = 8;
        Parameters:
        value - The bytes of the loopExitNames to add.
        Returns:
        This builder for chaining.
      • getLoopEnterNamesList

        public org.nd4j.shade.protobuf.ProtocolStringList getLoopEnterNamesList()
         List of names for enter tensors.
         
        repeated string loop_enter_names = 10;
        Specified by:
        getLoopEnterNamesList in interface WhileContextDefOrBuilder
        Returns:
        A list containing the loopEnterNames.
      • getLoopEnterNamesCount

        public int getLoopEnterNamesCount()
         List of names for enter tensors.
         
        repeated string loop_enter_names = 10;
        Specified by:
        getLoopEnterNamesCount in interface WhileContextDefOrBuilder
        Returns:
        The count of loopEnterNames.
      • getLoopEnterNames

        public String getLoopEnterNames​(int index)
         List of names for enter tensors.
         
        repeated string loop_enter_names = 10;
        Specified by:
        getLoopEnterNames in interface WhileContextDefOrBuilder
        Parameters:
        index - The index of the element to return.
        Returns:
        The loopEnterNames at the given index.
      • getLoopEnterNamesBytes

        public org.nd4j.shade.protobuf.ByteString getLoopEnterNamesBytes​(int index)
         List of names for enter tensors.
         
        repeated string loop_enter_names = 10;
        Specified by:
        getLoopEnterNamesBytes in interface WhileContextDefOrBuilder
        Parameters:
        index - The index of the value to return.
        Returns:
        The bytes of the loopEnterNames at the given index.
      • setLoopEnterNames

        public WhileContextDef.Builder setLoopEnterNames​(int index,
                                                         String value)
         List of names for enter tensors.
         
        repeated string loop_enter_names = 10;
        Parameters:
        index - The index to set the value at.
        value - The loopEnterNames to set.
        Returns:
        This builder for chaining.
      • addLoopEnterNames

        public WhileContextDef.Builder addLoopEnterNames​(String value)
         List of names for enter tensors.
         
        repeated string loop_enter_names = 10;
        Parameters:
        value - The loopEnterNames to add.
        Returns:
        This builder for chaining.
      • addAllLoopEnterNames

        public WhileContextDef.Builder addAllLoopEnterNames​(Iterable<String> values)
         List of names for enter tensors.
         
        repeated string loop_enter_names = 10;
        Parameters:
        values - The loopEnterNames to add.
        Returns:
        This builder for chaining.
      • clearLoopEnterNames

        public WhileContextDef.Builder clearLoopEnterNames()
         List of names for enter tensors.
         
        repeated string loop_enter_names = 10;
        Returns:
        This builder for chaining.
      • addLoopEnterNamesBytes

        public WhileContextDef.Builder addLoopEnterNamesBytes​(org.nd4j.shade.protobuf.ByteString value)
         List of names for enter tensors.
         
        repeated string loop_enter_names = 10;
        Parameters:
        value - The bytes of the loopEnterNames to add.
        Returns:
        This builder for chaining.
      • hasValuesDef

        public boolean hasValuesDef()
         Values and external values in control flow context.
         
        .tensorflow.ValuesDef values_def = 9;
        Specified by:
        hasValuesDef in interface WhileContextDefOrBuilder
        Returns:
        Whether the valuesDef field is set.
      • getValuesDef

        public ValuesDef getValuesDef()
         Values and external values in control flow context.
         
        .tensorflow.ValuesDef values_def = 9;
        Specified by:
        getValuesDef in interface WhileContextDefOrBuilder
        Returns:
        The valuesDef.
      • setValuesDef

        public WhileContextDef.Builder setValuesDef​(ValuesDef value)
         Values and external values in control flow context.
         
        .tensorflow.ValuesDef values_def = 9;
      • mergeValuesDef

        public WhileContextDef.Builder mergeValuesDef​(ValuesDef value)
         Values and external values in control flow context.
         
        .tensorflow.ValuesDef values_def = 9;
      • clearValuesDef

        public WhileContextDef.Builder clearValuesDef()
         Values and external values in control flow context.
         
        .tensorflow.ValuesDef values_def = 9;
      • getValuesDefBuilder

        public ValuesDef.Builder getValuesDefBuilder()
         Values and external values in control flow context.
         
        .tensorflow.ValuesDef values_def = 9;
      • getMaximumIterationsNameBytes

        public org.nd4j.shade.protobuf.ByteString getMaximumIterationsNameBytes()
         Optional name of the maximum_iterations tensor.
         
        string maximum_iterations_name = 11;
        Specified by:
        getMaximumIterationsNameBytes in interface WhileContextDefOrBuilder
        Returns:
        The bytes for maximumIterationsName.
      • setMaximumIterationsName

        public WhileContextDef.Builder setMaximumIterationsName​(String value)
         Optional name of the maximum_iterations tensor.
         
        string maximum_iterations_name = 11;
        Parameters:
        value - The maximumIterationsName to set.
        Returns:
        This builder for chaining.
      • clearMaximumIterationsName

        public WhileContextDef.Builder clearMaximumIterationsName()
         Optional name of the maximum_iterations tensor.
         
        string maximum_iterations_name = 11;
        Returns:
        This builder for chaining.
      • setMaximumIterationsNameBytes

        public WhileContextDef.Builder setMaximumIterationsNameBytes​(org.nd4j.shade.protobuf.ByteString value)
         Optional name of the maximum_iterations tensor.
         
        string maximum_iterations_name = 11;
        Parameters:
        value - The bytes for maximumIterationsName to set.
        Returns:
        This builder for chaining.
      • getNestedContextsCount

        public int getNestedContextsCount()
         Contexts contained inside this context (e.g. nested whiles).
         
        repeated .tensorflow.ControlFlowContextDef nested_contexts = 12;
        Specified by:
        getNestedContextsCount in interface WhileContextDefOrBuilder
      • setNestedContexts

        public WhileContextDef.Builder setNestedContexts​(int index,
                                                         ControlFlowContextDef value)
         Contexts contained inside this context (e.g. nested whiles).
         
        repeated .tensorflow.ControlFlowContextDef nested_contexts = 12;
      • addNestedContexts

        public WhileContextDef.Builder addNestedContexts​(ControlFlowContextDef value)
         Contexts contained inside this context (e.g. nested whiles).
         
        repeated .tensorflow.ControlFlowContextDef nested_contexts = 12;
      • addNestedContexts

        public WhileContextDef.Builder addNestedContexts​(int index,
                                                         ControlFlowContextDef value)
         Contexts contained inside this context (e.g. nested whiles).
         
        repeated .tensorflow.ControlFlowContextDef nested_contexts = 12;
      • clearNestedContexts

        public WhileContextDef.Builder clearNestedContexts()
         Contexts contained inside this context (e.g. nested whiles).
         
        repeated .tensorflow.ControlFlowContextDef nested_contexts = 12;
      • removeNestedContexts

        public WhileContextDef.Builder removeNestedContexts​(int index)
         Contexts contained inside this context (e.g. nested whiles).
         
        repeated .tensorflow.ControlFlowContextDef nested_contexts = 12;
      • getNestedContextsBuilder

        public ControlFlowContextDef.Builder getNestedContextsBuilder​(int index)
         Contexts contained inside this context (e.g. nested whiles).
         
        repeated .tensorflow.ControlFlowContextDef nested_contexts = 12;
      • addNestedContextsBuilder

        public ControlFlowContextDef.Builder addNestedContextsBuilder()
         Contexts contained inside this context (e.g. nested whiles).
         
        repeated .tensorflow.ControlFlowContextDef nested_contexts = 12;
      • addNestedContextsBuilder

        public ControlFlowContextDef.Builder addNestedContextsBuilder​(int index)
         Contexts contained inside this context (e.g. nested whiles).
         
        repeated .tensorflow.ControlFlowContextDef nested_contexts = 12;
      • getNestedContextsBuilderList

        public List<ControlFlowContextDef.Builder> getNestedContextsBuilderList()
         Contexts contained inside this context (e.g. nested whiles).
         
        repeated .tensorflow.ControlFlowContextDef nested_contexts = 12;
      • setUnknownFields

        public final WhileContextDef.Builder setUnknownFields​(org.nd4j.shade.protobuf.UnknownFieldSet unknownFields)
        Specified by:
        setUnknownFields in interface org.nd4j.shade.protobuf.Message.Builder
        Overrides:
        setUnknownFields in class org.nd4j.shade.protobuf.GeneratedMessageV3.Builder<WhileContextDef.Builder>
      • mergeUnknownFields

        public final WhileContextDef.Builder mergeUnknownFields​(org.nd4j.shade.protobuf.UnknownFieldSet unknownFields)
        Specified by:
        mergeUnknownFields in interface org.nd4j.shade.protobuf.Message.Builder
        Overrides:
        mergeUnknownFields in class org.nd4j.shade.protobuf.GeneratedMessageV3.Builder<WhileContextDef.Builder>