Class MPSRNNSingleGateDescriptor

  • All Implemented Interfaces:
    NSObject

    public class MPSRNNSingleGateDescriptor
    extends MPSRNNDescriptor
    MPSRNNSingleGateDescriptor [@dependency] This depends on Metal.framework The MPSRNNSingleGateDescriptor specifies a simple recurrent block/layer descriptor. The RNN layer initialized with a MPSRNNSingleGateDescriptor transforms the input data (image or matrix), and previous output with a set of filters, each producing one feature map in the new output data. The user may provide the RNN unit a single input or a sequence of inputs. Description of operation: Let x_j be the input data (at time index t of sequence, j index containing quadruplet: batch index, x,y and feature index (x=y=0 for matrices)). Let h0_j be the recurrent input (previous output) data from previous time step (at time index t-1 of sequence). Let h1_i be the output data produced at this time step. Let W_ij, U_ij be the weights for input and recurrent input data respectively Let b_i be a bias term Let gi(x) be a neuron activation function Then the new output image h1_i data is computed as follows: h1_i = gi( W_ij * x_j + U_ij * h0_j + b_i ) The '*' stands for convolution (see @ref MPSRNNImageInferenceLayer) or matrix-vector/matrix multiplication (see @ref MPSRNNMatrixInferenceLayer). Summation is over index j (except for the batch index), but there is no summation over repeated index i - the output index. Note that for validity all intermediate images have to be of same size and the U matrix has to be square (ie. outputFeatureChannels == inputFeatureChannels in those). Also the bias terms are scalars wrt. spatial dimensions. API-Since: 11.0
    • Constructor Detail

      • MPSRNNSingleGateDescriptor

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

      • accessInstanceVariablesDirectly

        public static boolean accessInstanceVariablesDirectly()
      • automaticallyNotifiesObserversForKey

        public static boolean automaticallyNotifiesObserversForKey​(@NotNull
                                                                   @NotNull java.lang.String key)
      • 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()
      • createRNNSingleGateDescriptorWithInputFeatureChannelsOutputFeatureChannels

        @NotNull
        public static @NotNull MPSRNNSingleGateDescriptor createRNNSingleGateDescriptorWithInputFeatureChannelsOutputFeatureChannels​(long inputFeatureChannels,
                                                                                                                                     long outputFeatureChannels)
        Creates a MPSRNNSingleGateDescriptor
        Parameters:
        inputFeatureChannels - The number of feature channels in the input image/matrix. Must be >= 1.
        outputFeatureChannels - The number of feature channels in the output image/matrix. Must be >= 1.
        Returns:
        A valid MPSRNNSingleGateDescriptor object or nil, if failure. API-Since: 11.0
      • debugDescription_static

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

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

        public static long hash_static()
      • inputWeights

        @Nullable
        public @Nullable MPSCNNConvolutionDataSource inputWeights()
        [@property] inputWeights Contains weights 'W_ij', bias 'b_i' and neuron 'gi' from the simple RNN layer formula. If nil then assumed zero weights, bias and no neuron (identity mapping). Defaults to nil.
      • 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)
      • recurrentWeights

        @Nullable
        public @Nullable MPSCNNConvolutionDataSource recurrentWeights()
        [@property] recurrentWeights Contains weights 'U_ij' from the simple RNN layer formula. If nil then assumed zero weights. Defaults to nil.
      • resolveClassMethod

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

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

        public void setInputWeights​(@Nullable
                                    @Nullable MPSCNNConvolutionDataSource value)
        [@property] inputWeights Contains weights 'W_ij', bias 'b_i' and neuron 'gi' from the simple RNN layer formula. If nil then assumed zero weights, bias and no neuron (identity mapping). Defaults to nil.
      • setRecurrentWeights

        public void setRecurrentWeights​(@Nullable
                                        @Nullable MPSCNNConvolutionDataSource value)
        [@property] recurrentWeights Contains weights 'U_ij' from the simple RNN layer formula. If nil then assumed zero weights. Defaults to nil.
      • setVersion_static

        public static void setVersion_static​(long aVersion)
      • superclass_static

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

        public static long version_static()
      • useStoredAccessor

        @Deprecated
        public static boolean useStoredAccessor()
        Deprecated.