Beispiel #1
0
 def train():
     X, Y = self.loader.load_data(self.trainFileNames,
                                  max_len=Meta.max_string_len)
     model = NN.train(X, Y)
     model.save('../Model/model')
     self.log('结束训练')
     setState('ready')
Beispiel #2
0
 def train():
     X, Y = self.loader.load_data(self.trainFileNames, max_len=Meta.max_string_len)
     model = NN.train(X, Y)
     model.save('../Model/model')
     self.log('结束训练')
     setState('ready')
Beispiel #3
0
import Core.NN as NN
from Utils.Preprocessor import Preprocessor
import Utils.Meta as Meta

if __name__ == '__main__':
    p = Preprocessor()
    X, Y = p.load_data(
        ['../DataSet/BarackObama.csv', '../DataSet/DonaldTrumpTweets'],
        Meta.max_string_len)
    model = NN.train(X, Y)
    model.save('../Model/model')
Beispiel #4
0
import Core.NN as NN
from Utils.Preprocessor import Preprocessor
import Utils.Meta as Meta

if __name__ == '__main__':
    p = Preprocessor()
    X, Y = p.load_data([
        '../DataSet/BarackObama.csv',
        '../DataSet/DonaldTrumpTweets'
    ], Meta.max_string_len)
    model = NN.train(X, Y)
    model.save('../Model/model')