Neural Network Visualization Tools


loss visualization plotting tools

Author: Jacob Reinhold (

Created on: Nov 2, 2018

synthtorch.plot.loss.plot_loss(all_losses: List[list], figsize: Tuple[int, int] = (14, 7), scale: int = 0, ecolor: str = 'red', filename: Optional[str] = None, ax: object = None, label: str = '', plot_error: bool = True)

plot loss vs epoch for a given list (of lists) of loss values

  • all_losses (list) – list of lists of loss values per epoch
  • figsize (tuple) – two ints in a tuple controlling figure size
  • scale (int) – two ints in a tuple controlling figure size
  • ecolor (str) – color of errorbars
  • filename (str) – if provided, save file at this path
  • ax (matplotlib ax object) – supply an ax if desired
  • label (str) – label for ax.plot
  • plot_error (bool) – plot error bars or nah

ax that the plot was created on

Return type:

ax (matplotlib ax object)