Class MPSCNNConvolutionTransposeGradient

  • All Implemented Interfaces:
    NSCoding, NSCopying, NSSecureCoding, NSObject

    public class MPSCNNConvolutionTransposeGradient
    extends MPSCNNGradientKernel
    MPSCNNConvolutionTransposeGradient [@dependency] This depends on Metal.framework The MPSCNNConvolutionTransposeGradient implementents backward propagation of gradient for MPSCNNConvolutionTranspose forward filter
    • Constructor Detail

      • MPSCNNConvolutionTransposeGradient

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

      • accessInstanceVariablesDirectly

        public static boolean accessInstanceVariablesDirectly()
      • allocWithZone

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

        public static boolean automaticallyNotifiesObserversForKey​(java.lang.String key)
      • cancelPreviousPerformRequestsWithTarget

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

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

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

        public static org.moe.natj.objc.Class classForKeyedUnarchiver()
      • dataSource

        public MPSCNNConvolutionDataSource dataSource()
        [@property] dataSource dataSource with which gradient object was created
      • debugDescription_static

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

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

        public long gradientOption()
        [@property] gradientOption Option to control which gradient to compute. Default is MPSCNNConvolutionGradientOptionAll which means both gradient with respect to data and gradient with respect to weight and bias are computed.
      • groups

        public long groups()
        [@property] groups Number of groups input and output channels are divided into.
      • hash_static

        public static long hash_static()
      • initWithCoderDevice

        public MPSCNNConvolutionTransposeGradient initWithCoderDevice​(NSCoder aDecoder,
                                                                      java.lang.Object device)
        NSSecureCoding compatability While the standard NSSecureCoding/NSCoding method -initWithCoder: should work, since the file can't know which device your data is allocated on, we have to guess and may guess incorrectly. To avoid that problem, use initWithCoder:device instead.
        Overrides:
        initWithCoderDevice in class MPSCNNGradientKernel
        Parameters:
        aDecoder - The NSCoder subclass with your serialized MPSKernel
        device - The MTLDevice on which to make the MPSKernel
        Returns:
        A new MPSKernel object, or nil if failure.
      • initWithDevice

        public MPSCNNConvolutionTransposeGradient initWithDevice​(java.lang.Object device)
        Description copied from class: MPSCNNGradientKernel
        Standard init with default properties per filter type
        Overrides:
        initWithDevice in class MPSCNNGradientKernel
        Parameters:
        device - The device that the filter will be used on. May not be NULL.
        Returns:
        A pointer to the newly initialized object. This will fail, returning nil if the device is not supported. Devices must be MTLFeatureSet_iOS_GPUFamily2_v1 or later.
      • initWithDeviceWeights

        public MPSCNNConvolutionTransposeGradient initWithDeviceWeights​(MTLDevice device,
                                                                        MPSCNNConvolutionDataSource weights)
        Initializes a convolution transpose gradient (with respect to weights and bias) object.
        Parameters:
        device - The MTLDevice on which this MPSCNNConvolutionGradient filter will be used
        weights - A pointer to a object that conforms to the MPSCNNConvolutionDataSource protocol. Note that same data source as provided to forward convolution should be used.
        Returns:
        A valid MPSCNNConvolutionTransposeGradient object or nil, if failure.
      • 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

        public static NSSet<java.lang.String> keyPathsForValuesAffectingValueForKey​(java.lang.String key)
      • new_objc

        public static java.lang.Object new_objc()
      • reloadWeightsAndBiasesFromDataSource

        public void reloadWeightsAndBiasesFromDataSource()
        CPU side reload. Reload the updated weights and biases from data provider into internal weights and bias buffers. Weights and biases gradients needed for update are obtained from MPSCNNConvolutionGradientState object. Data provider passed in init call is used for this purpose.
      • reloadWeightsAndBiasesWithCommandBufferState

        public void reloadWeightsAndBiasesWithCommandBufferState​(MTLCommandBuffer commandBuffer,
                                                                 MPSCNNConvolutionWeightsAndBiasesState state)
        GPU side reload. Reload the updated weights and biases from update buffer produced by application enqueued metal kernel into internal weights and biases buffer. Weights and biases gradients needed for update are obtained from MPSCNNConvolutionGradientState object's gradientForWeights and gradientForBiases metal buffer.
        Parameters:
        commandBuffer - Metal command buffer on which application update kernel was enqueued consuming MPSCNNConvolutionGradientState's gradientForWeights and gradientForBiases buffer and producing updateBuffer metal buffer.
        state - MPSCNNConvolutionWeightsAndBiasesState containing weights and biases buffers which have updated weights produced by application's update kernel.
      • resolveClassMethod

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

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

        public void setGradientOption​(long value)
        [@property] gradientOption Option to control which gradient to compute. Default is MPSCNNConvolutionGradientOptionAll which means both gradient with respect to data and gradient with respect to weight and bias are computed.
      • setVersion_static

        public static void setVersion_static​(long aVersion)
      • sourceGradientFeatureChannels

        public long sourceGradientFeatureChannels()
        [@property] sourceGradientFeatureChannels The number of feature channels per pixel in the gradient image (primarySource) of encode call. This is same is outputFeatureChannels or the feature channels of destination image in forward convolution i.e. dataSource.descriptor.outputFeatureChannels
      • sourceImageFeatureChannels

        public long sourceImageFeatureChannels()
        [@property] sourceImageFeatureChannels The number of feature channels per pixel in the input image to forward convolution which is used here as secondarySource. This is same as dataSource.descriptor.inputFeatureChannels. This is also the number of feature channels in destinatin image here i.e. gradient with respect to data.
      • superclass_static

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

        public static boolean supportsSecureCoding()
      • _supportsSecureCoding

        public boolean _supportsSecureCoding()
        Description copied from interface: NSSecureCoding
        This property must return YES on all classes that allow secure coding. Subclasses of classes that adopt NSSecureCoding and override initWithCoder: must also override this method and return YES. The Secure Coding Guide should be consulted when writing methods that decode data.
        Specified by:
        _supportsSecureCoding in interface NSSecureCoding
        Overrides:
        _supportsSecureCoding in class MPSCNNGradientKernel
      • version_static

        public static long version_static()