class_docstr: Update a graph of training and validation loss
class_docstr_tok: ["Update","a","graph","of","training","and","validation","loss"]
docstr: Plot validation loss in the pbar graph
docstr_tok: ["Plot","validation","loss","in","the","pbar","graph"]
code: def after_epoch(self):
      "Plot validation loss in the pbar graph"
      if not self.nb_batches:
          return
      rec = self.learn.recorder
      iters = range_of(rec.losses)
      val_losses = [v[1] for v in rec.values]
      x_bounds = (
          0,
          (self.n_epoch - len(self.nb_batches)) * self.nb_batches[0]
          + len(rec.losses),
      )
      y_bounds = (
          0,
          max((max(Tensor(rec.losses)), max(Tensor(val_losses)))),
      )
      self.progress.mbar.update_graph(
          [(iters, rec.losses), (self.nb_batches, val_losses)],
          x_bounds,
          y_bounds,
      )
  
imports: from __future__ import annotations
  from ..basics import *
label_desc: Use image node_id 3 for calling the ShowGraphCallback obj's underlying member method code with example usage: obj.after_epoch() without return types