.TH "MPSRNNSingleGateDescriptor" 3 "Mon Jul 9 2018" "Version MetalPerformanceShaders-119.3" "MetalPerformanceShaders.framework" \" -*- nroff -*- .ad l .nh .SH NAME MPSRNNSingleGateDescriptor .SH SYNOPSIS .br .PP .PP \fC#import \fP .PP Inherits \fBMPSRNNDescriptor\fP\&. .SS "Class Methods" .in +1c .ti -1c .RI "(nonnull instancetype) + \fBcreateRNNSingleGateDescriptorWithInputFeatureChannels:outputFeatureChannels:\fP" .br .in -1c .SS "Properties" .in +1c .ti -1c .RI "id< \fBMPSCNNConvolutionDataSource\fP > \fBinputWeights\fP" .br .ti -1c .RI "id< \fBMPSCNNConvolutionDataSource\fP > \fBrecurrentWeights\fP" .br .in -1c .SH "Detailed Description" .PP This depends on Metal\&.framework The \fBMPSRNNSingleGateDescriptor\fP specifies a simple recurrent block/layer descriptor\&. The RNN layer initialized with a \fBMPSRNNSingleGateDescriptor\fP 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\&. .PP .nf Description of operation: .fi .PP .PP 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\&. .PP Let W_ij, U_ij be the weights for input and recurrent input data respectively Let b_i be a bias term .PP Let gi(x) be a neuron activation function .PP Then the new output image h1_i data is computed as follows: .PP .nf h1_i = gi( W_ij * x_j + U_ij * h0_j + b_i ) .fi .PP .PP The '*' stands for convolution (see \fBMPSRNNImageInferenceLayer\fP) or matrix-vector/matrix multiplication (see \fBMPSRNNMatrixInferenceLayer\fP)\&. 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\&. .SH "Method Documentation" .PP .SS "+ (nonnull instancetype) createRNNSingleGateDescriptorWithInputFeatureChannels: (NSUInteger) inputFeatureChannels(NSUInteger) outputFeatureChannels" Creates a \fBMPSRNNSingleGateDescriptor\fP .PP \fBParameters:\fP .RS 4 \fIinputFeatureChannels\fP The number of feature channels in the input image/matrix\&. Must be >= 1\&. .br \fIoutputFeatureChannels\fP The number of feature channels in the output image/matrix\&. Must be >= 1\&. .RE .PP \fBReturns:\fP .RS 4 \fBA\fP valid \fBMPSRNNSingleGateDescriptor\fP object or nil, if failure\&. .RE .PP .SH "Property Documentation" .PP .SS "\- inputWeights\fC [read]\fP, \fC [write]\fP, \fC [nonatomic]\fP, \fC [retain]\fP" 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\&. .SS "\- recurrentWeights\fC [read]\fP, \fC [write]\fP, \fC [nonatomic]\fP, \fC [retain]\fP" Contains weights 'U_ij' from the simple RNN layer formula\&. If nil then assumed zero weights\&. Defaults to nil\&. .SH "Author" .PP Generated automatically by Doxygen for MetalPerformanceShaders\&.framework from the source code\&.