class LSTM(IClassifier): def __init__(self, recorder=None, config=None, relative=""): self.net = LSTMNet(config) self.data = LSTMData(config, self.net) self.train = LSTMTrain(config, self.net, self.data) self.classifier = LSTMClassify(config, self.net) #====================================================================== #=Interface methods==================================================== #====================================================================== def getName(self): return NAME def startTraining(self, args=[]): self.train.train(args) def classify(self, data): self.classifier.classify(data) def startValidation(self): self.data.validate() def load(self, filename=""): self.net.load(filename) def save(self, filename="", overwrite=True): self.net.save(filename, overwrite) def loadData(self, filename=""): self.data.loadData(filename) def saveData(self, filename=""): self.data.saveData(filename) def printClassifier(self): self.net.printNetwork()
def __init__(self, recorder=None, config=None, relative=""): self.net = LSTMNet(config) self.data = LSTMData(config, self.net) self.train = LSTMTrain(config, self.net, self.data) self.classifier = LSTMClassify(config, self.net)