Initial commit
This commit is contained in:
Binary file not shown.
@@ -0,0 +1,7 @@
|
||||
from abc import ABC
|
||||
|
||||
from matplotlib.figure import Figure
|
||||
|
||||
from neural_net.epoch import Epoch
|
||||
from neural_net.neural_net import NeuralNet
|
||||
from ui.plotters.plotter import Plotter
|
||||
@@ -0,0 +1 @@
|
||||
|
||||
@@ -0,0 +1,30 @@
|
||||
from abc import abstractmethod
|
||||
|
||||
from matplotlib.figure import Figure
|
||||
|
||||
from neural_net.epoch import Epoch
|
||||
|
||||
|
||||
class Plotter:
|
||||
def __init__(self, figure: Figure):
|
||||
self.figure = figure
|
||||
|
||||
def initialize_plots(self):
|
||||
self.figure.show()
|
||||
|
||||
@abstractmethod
|
||||
def update_plot(self, data):
|
||||
self.reset_plot()
|
||||
|
||||
self.plot(data)
|
||||
|
||||
self.figure.canvas.draw()
|
||||
self.figure.canvas.flush_events()
|
||||
|
||||
@abstractmethod
|
||||
def reset_plot(self):
|
||||
pass
|
||||
|
||||
@abstractmethod
|
||||
def plot(self, current_epoch: Epoch):
|
||||
pass
|
||||
Reference in New Issue
Block a user