%% Analyze Trained Network
% Load a pretrained GoogLeNet convolutional neural network.

net = googlenet

%
% Analyze the network. analyzeNetwork displays an interactive plot of the network architecture and a table containing information about the network layers.
% 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.
% 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.
% Show the total number of learnable parameters in each layer by clicking the arrow in the top-right corner of the layer table and select Total 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 total number of learnable parameters.

analyzeNetwork(net)

%
% Copyright 2018 The MathWorks, Inc.