waleedka / hiddenlayer

Neural network graphs and training metrics for PyTorch, Tensorflow, and Keras.
MIT License
1.79k stars 266 forks source link

Added configurable `title` for each canvas plot #39

Closed Mocuto closed 4 years ago

Mocuto commented 5 years ago

Right now, the title of each canvas is set via the metrics the plot is displaying. If you have a ton of metrics (in my case, I'm showing the gradients for each layer in a pretty deep neural network), this causes the following stack trace:

/lib/python3.4/site-packages/matplotlib/figure.py in update(self, left, bottom, right, top, wspace, hspace)
    219             if self.left >= self.right:
    220                 reset()
--> 221                 raise ValueError('left cannot be >= right')
    222 
    223             if self.bottom >= self.top:

ValueError: left cannot be >= right

This pull request allows customizable titles and also fixes that issue.

waleedka commented 4 years ago

Good idea. Thank you for the PR. I just merged it. Sorry for the big delay.