# analyzeNetwork

Analyze deep learning network architecture

## Syntax

## Description

Use `analyzeNetwork`

to visualize and understand the
architecture of a network, check that you have defined the architecture correctly, and
detect problems before training. Problems that `analyzeNetwork`

detects include incorrectly sized layer inputs, an incorrect number of layer inputs, and
invalid neural network structures.

**Tip**

To interactively build and visualize deep learning neural networks, use the Deep Network Designer app. For more information, see Get Started with Deep Network Designer.

`analyzeNetwork(`

analyzes and detects
errors and issues in the specified network or layer array. The function displays an
interactive visualization of the network architecture and provides detailed
information. The information includes the layer types, the sizes and formats of the
layer learnable parameters, states, and activations, and the total number of
learnable parameters.`net`

)

If the network contains `ProjectedLayer`

objects, then the function additionally displays
information about the percentage by which the number of learnables has
decreased.

If the network is a `taylorPrunableNetwork`

object, then the function additionally displays
information about the proportion of learnables removed by pruning and the number of
pruned filters.

Each activation dimension has one of these labels: `"S"`

(spatial), `"C"`

(channel), `"B"`

(batch),
`"T"`

(time or sequence), or `"U"`

(unspecified).

`analyzeNetwork(`

analyzes the neural network using the specified example network inputs. The software
propagates the example inputs through the network to determine the size and format
of layer activations, the size and number of learnable and state parameters, and the
total number of learnables. Use this syntax to analyze neural networks that have one
or more inputs that are not connected to an input layer.`net`

,`X1,...,Xn`

)

also returns a `info`

= analyzeNetwork(___)`NetworkAnalysis`

object. Use this object to programmatically access the
analysis results. For each layer, you can access the type, the total number of
learnable parameters, and the sizes and formats of the learnable parameters, states,
and
activations.

`___ = analyzeNetwork(___,Plots=`

also specifies which plots to display during the network analysis. To analyze the
network programmatically, without opening the analysis plot, set the
`plotName`

)`Plots`

option to `"none"`

.

## Examples

## Input Arguments

## Output Arguments

## Version History

**Introduced in R2018a**

## See Also

Deep Network
Designer | `trainnet`

| `trainingOptions`

| `dlnetwork`

| `plot`

| `summary`

| `NetworkAnalysis`

### Topics

- Create Simple Deep Learning Neural Network for Classification
- Prepare Network for Transfer Learning Using Deep Network Designer
- Build Networks with Deep Network Designer
- Retrain Neural Network to Classify New Images
- Pretrained Deep Neural Networks
- Visualize Activations of a Convolutional Neural Network
- Deep Learning in MATLAB