plot_network

plot_network(input_shape, network, file_name=None, show_shapes=True, show_layer_names=False, show_layer_activations=True, dpi=96)[source]

Plot the network with its input-output shapes and activations.

The network is plotted regardless of the output task. Its important to note that to be able to use this function, the pydot package should be installed in the environment as well as graphviz on the system. The function also works when the network is an auto-encoder based model, and the function will split the output files into 2 files, the first for the encoder and the second for the decoder.

Parameters:
input_shapetuple

The shape of the data fed into the input layer.

networkan element from the network module

Example: FCNNetwork().

file_namestr default = None (“model.pdf”)

File name of the plot image, without the extension.

show_shapesbool, default = True

Whether to display shape information.

show_layer_namesbool, default = False

Whether to display layer names.

show_layer_activationsbool, default = True

Display layer activations (only for layers that have an activation property).

dpiint, default = 96

Dots per inch.

Returns:
None