主要内容

deep.transform.ismax

Is-maximum mask transform

Since R2026a

    Description

    Y = deep.transform.ismax(X) applies the is-maximum mask transform to the input X. When you convert a Statistics and Machine Learning Toolbox™ neural network model that uses an is-maximum mask score transform to a dlnetwork object, the last layer of the network is a function layer that applies the deep.transform.ismax function.

    example

    Examples

    collapse all

    Apply the is-maximum mask transform to random data.

    X = rand(3,5);
    X = dlarray(X,"CB");
    Y = deep.transform.ismax(X)
    Y = 
      3(C) × 5(B) dlarray
    
         0     1     0     0     1
         1     0     0     0     0
         0     0     1     1     0
    
    

    Create a function layer that applies the is-maximum mask transform.

    layer = functionLayer(@deep.transform.ismax)
    layer = 
      FunctionLayer with properties:
    
                 Name: ''
           PredictFcn: @deep.transform.ismax
          Formattable: 0
        Acceleratable: 0
    
       Learnable Parameters
        No properties.
    
       State Parameters
        No properties.
    
      Show all properties
    
    

    Input Arguments

    collapse all

    Input data, specified as a dlarray object. X must have at most two dimensions.

    Output Arguments

    collapse all

    Transformed data, returned as a dlarray object that is the same size as X.

    Algorithms

    collapse all

    Version History

    Introduced in R2026a