Main Content

NetworkAnalysis

Deep learning network analysis information

Since R2024a

    Description

    Deep learning network analysis information, including total learnables, layer information, and network warnings.

    Creation

    Create a NetworkAnalysis object using the output of the analyzeNetwork function.

    Properties

    expand all

    This property is read-only.

    Total number of network learnables, returned as a positive integer. Learnables are parameters that the networks learns during the training process. For example, layer weights and biases.

    Note

    If the network has any errors, then the total number of learnables returned by the software is NaN. To see the total learnables, you must first fix any network errors. For more information, see Issues.

    Data Types: single | double | int8 | int16 | int32 | int64 | uint8 | uint16 | uint32 | uint64

    This property is read-only.

    Layer information, returned as a table. The table contains these variables:

    • Name — Layer name

    • Type — Layer type

    • ActivationSizes — Size of layer activations

    • ActivationFormats — Format of layer activations

    • LearnableSizes — Size of layer learnables, returned as a dictionary object. object.

    • NumLearnables — Number of learnables in layer

    • StateSizes — Size of layer states, returned as a dictionary object.

    If the network contains a ProjectedLayer object, then the table also contains:

    • LearnablesReduction — Proportion of learnables removed by projection

    If the network is a taylorPrunableNetwork object, then the table also contains:

    • LearnablesReduction — Proportion of learnables removed by pruning

    • NumPrunedFilters — Number of pruned filters

    Data Types: table

    This property is read-only.

    Network issues, including warnings and errors, returned as a table. The table contains these variables:

    • Type — Issue type, such as warning or error

    • Layer — Name of layer with the issue

    • Info — Information about the issue

    Data Types: table

    This property is read-only.

    Number of network errors, returned as a nonnegative integer.

    Data Types: single | double | int8 | int16 | int32 | int64 | uint8 | uint16 | uint32 | uint64

    This property is read-only.

    Number of network warnings, returned as a nonnegative integer.

    Data Types: single | double | int8 | int16 | int32 | int64 | uint8 | uint16 | uint32 | uint64

    This property is read-only.

    Time of analysis, returned as a datetime object.

    Data Types: datetime

    Object Functions

    analyzeNetworkAnalyze deep learning network architecture

    Examples

    collapse all

    Load a pretrained GoogLeNet convolutional neural network.

    net = imagePretrainedNetwork("googlenet");

    Analyze the network. analyzeNetwork displays an interactive plot of the network architecture and a table containing information about the network layers.

    info = analyzeNetwork(net);

    Investigate the network architecture using the plot to the left. Select a layer in the plot. The selected layer is highlighted in the plot and in the layer table.

    In the table, view layer information such as layer properties, layer type, and sizes of the layer activations and learnable parameters. The activations of a layer are the outputs of that layer. Each activation dimension has one of the following labels:

    • S — Spatial

    • C — Channel

    • B — Batch observations

    • T — Time or sequence

    • U — Unspecified

    View the dimension labels to understand how data propagates through the network and how the layers modify the size and layout of activations.

    Select a deeper layer in the network. Notice that activations in deeper layers are smaller in the spatial dimensions (the first two dimensions) and larger in the channel dimension (the last dimension). Using this structure enables convolutional neural networks to gradually increase the number of extracted image features while decreasing the spatial resolution.

    The Deep Learning Network Analyzer shows the total number of learnable parameters in the network, to one decimal place. To see the exact number of learnable parameters, pause on total learnables. To show the number of learnable parameters in each layer, click the arrow in the top-right corner of the layer table and select Number of Learnables. To sort the layer table by column value, hover the mouse over the column heading and click the arrow that appears. For example, you can determine which layer contains the most parameters by sorting the layers by the number of learnable parameters.

    Programmatically view the network analysis results.

    info
    info = 
      NetworkAnalysis with properties:
    
        TotalLearnables: 6998552
              LayerInfo: [143×7 table]
                 Issues: [0×3 table]
              NumErrors: 0
            NumWarnings: 0
           AnalysisDate: 11-Dec-2023 17:48:12
    
    

    Version History

    Introduced in R2024a

    expand all