tfl.visualization.plot_outputs

View source on GitHub

Visualises several outputs for same set of inputs.

tfl.visualization.plot_outputs(
    inputs,
    outputs_map,
    file_path=None,
    figsize=(20, 20)
)

Used in the notebooks

Used in the tutorials

This is generic plotting helper not tied to any layer. Can visualize either: - 2-d graphs: 1-d input, 1-d output. - 3-d surfaces: 2-d input, 1-d output.

Args:

  • inputs: one of:
    • ordered list of 1-d points
    • tuple of exactly 2 elements which represent X and Y coordinates of 2-d mesh grid for pyplot 3-d surface visualization. See test_utils.two_dim_mesh_grid for more details.
  • outputs_map: dictionary {name: outputs} where "outputs" is a list of 1-d points which correspond to "inputs". "name" is an arbitrary string used as legend.
  • file_path: if set - visualisation will be saved as png at specified location.
  • figsize: The figsize parameter passed to pyplot.figure().

Raises:

  • ValueError: if configured to visualise more than 4 3-d plots.

Returns:

Pyplot object containing visualisation.