summary

FullyConnected.summary(line_length=None, positions=None, print_fn=None, expand_nested=False, show_trainable=False, layer_range=None)

Prints a string summary of the network.

Parameters:
  • line_length – Total length of printed lines (e.g. set this to adapt the display to different terminal window sizes).

  • positions – Relative or absolute positions of log elements in each line. If not provided, becomes [0.3, 0.6, 0.70, 1.]. Defaults to None.

  • print_fn – Print function to use. By default, prints to stdout. If stdout doesn’t work in your environment, change to print. It will be called on each line of the summary. You can set it to a custom function in order to capture the string summary.

  • expand_nested – Whether to expand the nested models. Defaults to False.

  • show_trainable – Whether to show if a layer is trainable. Defaults to False.

  • layer_range – a list or tuple of 2 strings, which is the starting layer name and ending layer name (both inclusive) indicating the range of layers to be printed in summary. It also accepts regex patterns instead of exact name. In such case, start predicate will be the first element it matches to layer_range[0] and the end predicate will be the last element it matches to layer_range[1]. By default None which considers all layers of model.

Raises:

ValueError – if summary() is called before the model is built.