Class MPSGraphGRUDescriptor

  • All Implemented Interfaces:
    NSCopying, NSObject

    public class MPSGraphGRUDescriptor
    extends MPSGraphObject
    implements NSCopying
    This class defines parameters for a Gated Recurrent Unit (GRU) operation. Use this descriptor with the following ``MPSGraph`` methods: - ``MPSGraph/GRUWithSourceTensor:recurrentWeight:inputWeight:bias:descriptor:name:``, - ``MPSGraph/GRUWithSourceTensor:recurrentWeight:inputWeight:bias:initState:descriptor:name:``, - ``MPSGraph/GRUWithSourceTensor:recurrentWeight:inputWeight:bias:initState:mask:secondaryBias:descriptor:name:``, - ``MPSGraph/GRUGradientsWithSourceTensor:recurrentWeight:sourceGradient:zState:outputFwd:inputWeight:bias:descriptor:name:``, - ``MPSGraph/GRUGradientsWithSourceTensor:recurrentWeight:sourceGradient:zState:outputFwd:inputWeight:bias:initState:descriptor:name:`` and - ``MPSGraph/GRUGradientsWithSourceTensor:recurrentWeight:sourceGradient:zState:outputFwd:stateGradient:inputWeight:bias:initState:mask:secondaryBias:descriptor:name:``. API-Since: 16.0
    • Constructor Detail

      • MPSGraphGRUDescriptor

        protected MPSGraphGRUDescriptor​(org.moe.natj.general.Pointer peer)
    • Method Detail

      • accessInstanceVariablesDirectly

        public static boolean accessInstanceVariablesDirectly()
      • allocWithZone

        public static MPSGraphGRUDescriptor allocWithZone​(org.moe.natj.general.ptr.VoidPtr zone)
      • automaticallyNotifiesObserversForKey

        public static boolean automaticallyNotifiesObserversForKey​(@NotNull
                                                                   @NotNull java.lang.String key)
      • bidirectional

        public boolean bidirectional()
        A parameter that defines a bidirectional GRU layer. If set to `YES` then the input sequence is traversed in both directions and the two results are concatenated together on the channel-axis. Default value: `NO`.
      • cancelPreviousPerformRequestsWithTarget

        public static void cancelPreviousPerformRequestsWithTarget​(@NotNull
                                                                   @NotNull java.lang.Object aTarget)
      • cancelPreviousPerformRequestsWithTargetSelectorObject

        public static void cancelPreviousPerformRequestsWithTargetSelectorObject​(@NotNull
                                                                                 @NotNull java.lang.Object aTarget,
                                                                                 @NotNull
                                                                                 @NotNull org.moe.natj.objc.SEL aSelector,
                                                                                 @Nullable
                                                                                 @Nullable java.lang.Object anArgument)
      • classFallbacksForKeyedArchiver

        @NotNull
        public static @NotNull NSArray<java.lang.String> classFallbacksForKeyedArchiver()
      • classForKeyedUnarchiver

        @NotNull
        public static @NotNull org.moe.natj.objc.Class classForKeyedUnarchiver()
      • copyWithZone

        @NotNull
        public @NotNull java.lang.Object copyWithZone​(@Nullable
                                                      @Nullable org.moe.natj.general.ptr.VoidPtr zone)
        Specified by:
        copyWithZone in interface NSCopying
      • debugDescription_static

        public static java.lang.String debugDescription_static()
      • description_static

        public static java.lang.String description_static()
      • descriptor

        public static MPSGraphGRUDescriptor descriptor()
        Creates an GRU descriptor with default values.
      • flipZ

        public boolean flipZ()
        A parameter that chooses between two variants for the final output computation. If set to `YES` then the layer will compute the final value as `h[t] = z[t] h[t-1] + (1-z[t]) o[t]`. Otherwise it's computed as `h[t] = (1-z[t]) h[t-1] + z[t] o[t]`. Default value: `NO`.
      • hash_static

        public static long hash_static()
      • instanceMethodSignatureForSelector

        public static NSMethodSignature instanceMethodSignatureForSelector​(org.moe.natj.objc.SEL aSelector)
      • instancesRespondToSelector

        public static boolean instancesRespondToSelector​(org.moe.natj.objc.SEL aSelector)
      • isSubclassOfClass

        public static boolean isSubclassOfClass​(org.moe.natj.objc.Class aClass)
      • keyPathsForValuesAffectingValueForKey

        @NotNull
        public static @NotNull NSSet<java.lang.String> keyPathsForValuesAffectingValueForKey​(@NotNull
                                                                                             @NotNull java.lang.String key)
      • outputGateActivation

        public long outputGateActivation()
        A parameter which defines the activation function to use with the o-gate of the GRU op. Default value: `MPSGraphRNNActivationTanh`.
      • resetAfter

        public boolean resetAfter()
        A parameter that chooses between two variants for the reset gate computation. If set to `YES` then the layer will compute the intermediate value as `c[t] = ( b + (h[t-1] m ) R^T) r[t]`. Otherwise it's computed as `c[t] = (h[t-1] r[t] m) R^T`. Default value: `NO`.
      • resetGateActivation

        public long resetGateActivation()
        A parameter which defines the activation function to use with the r-gate of the GRU op. Default value: `MPSGraphRNNActivationSigmoid`.
      • resetGateFirst

        public boolean resetGateFirst()
        A parameter that controls the internal order of the GRU gates. If set to `YES` then the layer will use the gate-ordering `[ r, z, o ]` instead of default `[ z, r, o ]`. Default value: `NO`.
      • resolveClassMethod

        public static boolean resolveClassMethod​(org.moe.natj.objc.SEL sel)
      • resolveInstanceMethod

        public static boolean resolveInstanceMethod​(org.moe.natj.objc.SEL sel)
      • reverse

        public boolean reverse()
        A parameter that defines time direction of the input sequence. If set to `YES` then the input sequence is passed in reverse time order to the layer. Note: Ignored when `bidirectional = YES`. Default value: `NO`.
      • setBidirectional

        public void setBidirectional​(boolean value)
        A parameter that defines a bidirectional GRU layer. If set to `YES` then the input sequence is traversed in both directions and the two results are concatenated together on the channel-axis. Default value: `NO`.
      • setFlipZ

        public void setFlipZ​(boolean value)
        A parameter that chooses between two variants for the final output computation. If set to `YES` then the layer will compute the final value as `h[t] = z[t] h[t-1] + (1-z[t]) o[t]`. Otherwise it's computed as `h[t] = (1-z[t]) h[t-1] + z[t] o[t]`. Default value: `NO`.
      • setOutputGateActivation

        public void setOutputGateActivation​(long value)
        A parameter which defines the activation function to use with the o-gate of the GRU op. Default value: `MPSGraphRNNActivationTanh`.
      • setResetAfter

        public void setResetAfter​(boolean value)
        A parameter that chooses between two variants for the reset gate computation. If set to `YES` then the layer will compute the intermediate value as `c[t] = ( b + (h[t-1] m ) R^T) r[t]`. Otherwise it's computed as `c[t] = (h[t-1] r[t] m) R^T`. Default value: `NO`.
      • setResetGateActivation

        public void setResetGateActivation​(long value)
        A parameter which defines the activation function to use with the r-gate of the GRU op. Default value: `MPSGraphRNNActivationSigmoid`.
      • setResetGateFirst

        public void setResetGateFirst​(boolean value)
        A parameter that controls the internal order of the GRU gates. If set to `YES` then the layer will use the gate-ordering `[ r, z, o ]` instead of default `[ z, r, o ]`. Default value: `NO`.
      • setReverse

        public void setReverse​(boolean value)
        A parameter that defines time direction of the input sequence. If set to `YES` then the input sequence is passed in reverse time order to the layer. Note: Ignored when `bidirectional = YES`. Default value: `NO`.
      • setTraining

        public void setTraining​(boolean value)
        A parameter that makes the GRU layer support training. If set to `YES` then the layer will produce training state tensor as a secondary output. Default value: `NO`.
      • setUpdateGateActivation

        public void setUpdateGateActivation​(long value)
        A parameter which defines the activation function to use with the z-gate of the GRU op. Default value: `MPSGraphRNNActivationSigmoid`.
      • setVersion_static

        public static void setVersion_static​(long aVersion)
      • superclass_static

        public static org.moe.natj.objc.Class superclass_static()
      • training

        public boolean training()
        A parameter that makes the GRU layer support training. If set to `YES` then the layer will produce training state tensor as a secondary output. Default value: `NO`.
      • updateGateActivation

        public long updateGateActivation()
        A parameter which defines the activation function to use with the z-gate of the GRU op. Default value: `MPSGraphRNNActivationSigmoid`.
      • version_static

        public static long version_static()
      • useStoredAccessor

        @Deprecated
        public static boolean useStoredAccessor()
        Deprecated.