No puede seleccionar más de 25 temas Los temas deben comenzar con una letra o número, pueden incluir guiones ('-') y pueden tener hasta 35 caracteres de largo.

31 líneas
569B

  1. from abc import abstractmethod
  2. from matplotlib.figure import Figure
  3. from neural_net.epoch import Epoch
  4. class Plotter:
  5. def __init__(self, figure: Figure):
  6. self.figure = figure
  7. def initialize_plots(self):
  8. self.figure.show()
  9. @abstractmethod
  10. def update_plot(self, data):
  11. self.reset_plot()
  12. self.plot(data)
  13. self.figure.canvas.draw()
  14. self.figure.canvas.flush_events()
  15. @abstractmethod
  16. def reset_plot(self):
  17. pass
  18. @abstractmethod
  19. def plot(self, current_epoch: Epoch):
  20. pass