def loadLatestNeuralNetwork(): name = IO.getValuefromConfigfile('setting.json', 'latestNN') nn = NeuralNetwork.DFF() if name != None: nn.loadfromFile(name) else: print('No latest NeuralNetwork') return nn
def trainNeuralNetwork(MyNeuralNetwork): error = float(input('Input target error(0.1)\n>>>')) epochs = int(input('Input max epochs(-1)\n>>>')) print('Getting Datas...') Datas = IO.getDatas() print('Datas getted') if IO.getProfile(MyNeuralNetwork) == None: print('You must have training profile first!') editNeuralNetworkProfile(MyNeuralNetwork) Profile = IO.getProfile(MyNeuralNetwork) # Get Input/OutputData to matrix if IO.getValuefromConfigfile('setting.json', 'Verbose') != None: verbose = int(IO.getValuefromConfigfile('setting.json', 'Verbose')) else: verbose = p.VERBOSE_DEFAULT if IO.getValuefromConfigfile('setting.json', 'Loop_per_N_times') != None: loop = int(IO.getValuefromConfigfile('setting.json', 'Loop_per_N_times')) else: loop = p.VERBOSE_PER_LOOP_DEFAULT # Setting from config file TrainingType.trainbyBatch(MyNeuralNetwork, Datas, error, epochs, Profile, verbose, loop)
def getLatestNeuralNetworkName(): return IO.getValuefromConfigfile('setting.json', 'latestNN')
def listConfigfileValues(): print('Config list:') print('[v] Verbose Level. -> ' + str(IO.getValuefromConfigfile('setting.json', 'Verbose'))) print('[n] Verbose per "N" times. -> ' + str(IO.getValuefromConfigfile('setting.json', 'Loop_per_N_times')))