選択できるのは25トピックまでです。 トピックは、先頭が英数字で、英数字とダッシュ('-')を使用した35文字以内のものにしてください。

31 行
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