Class MPSNNForwardLossNode

  • All Implemented Interfaces:
    NSObject

    public class MPSNNForwardLossNode
    extends MPSNNFilterNode
    Node representing a @ref MPSNNForwardLoss kernel
    • Constructor Detail

      • MPSNNForwardLossNode

        protected MPSNNForwardLossNode​(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()
      • debugDescription_static

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

        public float delta()
      • description_static

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

        public float epsilon()
      • gradientFilterWithSource

        public MPSNNLossGradientNode gradientFilterWithSource​(MPSNNImageNode sourceGradient)
        Description copied from class: MPSNNFilterNode
        Return the gradient (backwards) version of this filter. The backwards training version of the filter will be returned. The non-gradient image and state arguments for the filter are automatically obtained from the target.
        Overrides:
        gradientFilterWithSource in class MPSNNFilterNode
        Parameters:
        sourceGradient - The gradient images corresponding with the resultImage of the target
      • gradientFilterWithSources

        public MPSNNLossGradientNode gradientFilterWithSources​(NSArray<? extends MPSNNImageNode> sourceGradient)
        ! @abstract Returns the gradient filter for predictions, if you want also gradients for labels then use -gradientFiltersWithSource(s):
        Overrides:
        gradientFilterWithSources in class MPSNNFilterNode
        Parameters:
        sourceGradient - The gradient images corresponding with the resultImage of the target
      • gradientFiltersWithSource

        public NSArray<? extends MPSNNLossGradientNode> gradientFiltersWithSource​(MPSNNImageNode sourceGradient)
        Description copied from class: MPSNNFilterNode
        Return multiple gradient versions of the filter MPSNNFilters that consume multiple inputs generally result in multiple conjugate filters for the gradient computation at the end of training. For example, a single concatenation operation that concatenates multple images will result in an array of slice operators that carve out subsections of the input gradient image.
        Overrides:
        gradientFiltersWithSource in class MPSNNFilterNode
      • gradientFiltersWithSources

        public NSArray<? extends MPSNNLossGradientNode> gradientFiltersWithSources​(NSArray<? extends MPSNNImageNode> sourceGradient)
        Description copied from class: MPSNNFilterNode
        Return multiple gradient versions of the filter MPSNNFilters that consume multiple inputs generally result in multiple conjugate filters for the gradient computation at the end of training. For example, a single concatenation operation that concatenates multple images will result in an array of slice operators that carve out subsections of the input gradient image.
        Overrides:
        gradientFiltersWithSources in class MPSNNFilterNode
      • hash_static

        public static long hash_static()
      • initWithSourcesLossDescriptor

        public MPSNNForwardLossNode initWithSourcesLossDescriptor​(NSArray<? extends MPSNNImageNode> sourceNodes,
                                                                  MPSCNNLossDescriptor descriptor)
        Init a forward loss node from multiple images
        Parameters:
        sourceNodes - The MPSNNImageNode representing the source MPSImages for the filter Node0: logits, Node1: labels, Node2: weights
        Returns:
        A new MPSNNFilter node.
      • 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)
      • labelSmoothing

        public float labelSmoothing()
      • lossType

        public int lossType()
      • new_objc

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

        public static MPSNNForwardLossNode nodeWithSourcesLossDescriptor​(NSArray<? extends MPSNNImageNode> sourceNodes,
                                                                         MPSCNNLossDescriptor descriptor)
        Init a forward loss node from multiple images
        Parameters:
        sourceNodes - The MPSNNImageNode representing the source MPSImages for the filter Node0: logits, Node1: labels, Node2: weights
        Returns:
        A new MPSNNFilter node.
      • numberOfClasses

        public long numberOfClasses()
      • propertyCallBack

        public MPSNNLossCallback propertyCallBack()
        [@property] propertyCallBack Optional callback option - setting this allows the scalar weight value to be changed dynamically at encode time. Default value: nil.
      • reductionType

        public int reductionType()
      • resolveClassMethod

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

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

        public void setPropertyCallBack​(MPSNNLossCallback value)
        [@property] propertyCallBack Optional callback option - setting this allows the scalar weight value to be changed dynamically at encode time. Default value: 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()
      • weight

        public float weight()
      • reduceAcrossBatch

        public boolean reduceAcrossBatch()