.TH "MPSCNNConvolutionWeightsAndBiasesState" 3 "Mon Jul 9 2018" "Version MetalPerformanceShaders-119.3" "MetalPerformanceShaders.framework" \" -*- nroff -*- .ad l .nh .SH NAME MPSCNNConvolutionWeightsAndBiasesState .SH SYNOPSIS .br .PP .PP \fC#import \fP .PP Inherits \fBMPSState\fP\&. .SS "Instance Methods" .in +1c .ti -1c .RI "(nonnull instancetype) \- \fBinitWithWeights:biases:\fP" .br .ti -1c .RI "(nonnull instancetype) \- \fBinitWithDevice:cnnConvolutionDescriptor:\fP" .br .in -1c .SS "Class Methods" .in +1c .ti -1c .RI "(nonnull instancetype) + \fBtemporaryCNNConvolutionWeightsAndBiasesStateWithCommandBuffer:cnnConvolutionDescriptor:\fP" .br .in -1c .SS "Properties" .in +1c .ti -1c .RI "__nonnull id< MTLBuffer > \fBweights\fP" .br .ti -1c .RI "__nullable id< MTLBuffer > \fBbiases\fP" .br .in -1c .SH "Detailed Description" .PP The \fBMPSCNNConvolutionWeightsAndBiasesState\fP is returned by exportWeightsAndBiasesWithCommandBuffer: method on \fBMPSCNNConvolution\fP object\&. This is mainly used for GPU side weights/biases update process\&. During training, application can keep a copy of weights, velocity, momentum MTLBuffers in its data source, update the weights (in-place or out of place) with gradients obtained from \fBMPSCNNConvolutionGradientState\fP and call [\fBMPSCNNConvolution\fP reloadWeightsAndBiasesWithCommandBuffer] with resulting updated MTLBuffer\&. If application does not want to keep a copy of weights/biases, it can call [\fBMPSCNNConvolution\fP exportWeightsAndBiasesWithCommandBuffer:] to get the current weights from convolution itself, do the updated and call reloadWithCommandBuffer\&. .SH "Method Documentation" .PP .SS "\- (nonnull instancetype) initWithDevice: (__nonnull id< MTLDevice >) device(\fBMPSCNNConvolutionDescriptor\fP *__nonnull) descriptor" .SS "\- (nonnull instancetype) initWithWeights: (__nonnull id< MTLBuffer >) weights(__nullable id< MTLBuffer >) biases" .SS "+ (nonnull instancetype) temporaryCNNConvolutionWeightsAndBiasesStateWithCommandBuffer: (__nonnull id< MTLCommandBuffer >) commandBuffer(\fBMPSCNNConvolutionDescriptor\fP *__nonnull) descriptor" .SH "Property Documentation" .PP .SS "\- biases\fC [read]\fP, \fC [nonatomic]\fP, \fC [assign]\fP" \fBA\fP buffer that contains the biases\&. Each value is float and there are ouputFeatureChannels values\&. .SS "\- weights\fC [read]\fP, \fC [nonatomic]\fP, \fC [assign]\fP" \fBA\fP buffer that contains the weights\&. Each value in the buffer is a float\&. The layout of the weights with respect to the weights is the same as the weights layout provided by data source i\&.e\&. it can be interpreted as 4D array .PP .nf weights[outputFeatureChannels][kernelHeight][kernelWidth][inputFeatureChannels/groups] .fi .PP .SH "Author" .PP Generated automatically by Doxygen for MetalPerformanceShaders\&.framework from the source code\&.