Exemplo n.º 1
0
def recoverNeuralNetwork():
    name = input('Input NeuralNetwork\'s name to be recovered.\n>>>')
    nn = NeuralNetwork.DFF()
    nn.loadfromFile(name + '_backup')
    nn.Name = name
    IO.setValuetoConfigfile('setting.json', 'latestNN', nn.Name)
    return nn
Exemplo n.º 2
0
def editBackproprogation(MyNeuralNetwork):
    speed = float(input('Input speed value.\n>>>'))
    # targeterr = input('Input target error value.\n>>>')
    IO.setValuetoConfigfile(
        p.SAVED_PATH + MyNeuralNetwork.Name + '_profile.json',
        'LearningAlgorithm', 'BackPropagation')
    IO.setValuetoConfigfile(
        p.SAVED_PATH + MyNeuralNetwork.Name + '_profile.json', 'Speed', speed)
Exemplo n.º 3
0
def createNeuralNetwork():
    name = input('Input NeuralNetwork\'s name to be created.\n>>>')
    layerscount = int(input('Input "'+name+'" NeuralNetwork\'s layers count.\n>>>'))
    layerneuronscount = []
    for layer in range(0, layerscount):
        layerneuronscount.append(int(input('Input layer('+str(layer+1)+'\\'+str(layerscount)+')\'s neurons count.\n>>>')))
    nn = NeuralNetwork.DFF(layerscount, layerneuronscount, name)
    nn.savetoFile()
    IO.setValuetoConfigfile('setting.json', 'latestNN', nn.Name)
    return nn
Exemplo n.º 4
0
def editAdam(MyNeuralNetwork):
    speed = float(input('Input speed value('+str(p.PROFILE_DEFAULT['Speed'])+').\n>>>'))
    beta1 = float(input('Input Beta1(decay rate)('+str(p.PROFILE_DEFAULT['Beta1'])+').\n>>>'))
    beta2 = float(input('Input Beta2(decay rate)('+str(p.PROFILE_DEFAULT['Beta2'])+').\n>>>'))
    # targeterr = input('Input target error value.\n>>>')
    IO.setValuetoConfigfile(p.SAVED_PATH+MyNeuralNetwork.Name+'_profile.json', 'LearningAlgorithm', 'Adam')
    IO.setValuetoConfigfile(p.SAVED_PATH+MyNeuralNetwork.Name+'_profile.json', 'Speed', speed)
    IO.setValuetoConfigfile(p.SAVED_PATH+MyNeuralNetwork.Name+'_profile.json', 'Beta1', beta1)
    IO.setValuetoConfigfile(p.SAVED_PATH+MyNeuralNetwork.Name+'_profile.json', 'Beta2', beta2)
    IO.setValuetoConfigfile(p.SAVED_PATH+MyNeuralNetwork.Name+'_profile.json', 'Epsilon', p.PROFILE_DEFAULT['Epsilon'])
Exemplo n.º 5
0
def editRMSprop(MyNeuralNetwork):
    speed = float(input('Input speed value('+str(p.PROFILE_DEFAULT['Speed'])+').\n>>>'))
    decayrate = float(input('Input decay rate('+str(p.PROFILE_DEFAULT['DecayRate'])+').\n>>>'))
    # targeterr = input('Input target error value.\n>>>')
    IO.setValuetoConfigfile(p.SAVED_PATH+MyNeuralNetwork.Name+'_profile.json', 'LearningAlgorithm', 'RMSprop')
    IO.setValuetoConfigfile(p.SAVED_PATH+MyNeuralNetwork.Name+'_profile.json', 'Speed', speed)
    IO.setValuetoConfigfile(p.SAVED_PATH+MyNeuralNetwork.Name+'_profile.json', 'DecayRate', decayrate)
    IO.setValuetoConfigfile(p.SAVED_PATH+MyNeuralNetwork.Name+'_profile.json', 'Epsilon', p.PROFILE_DEFAULT['Epsilon'])
Exemplo n.º 6
0
def editNesterovMomentum(MyNeuralNetwork):
    speed = float(input('Input speed value.\n>>>'))
    momentumrate = float(input('Input momentum rate.\n>>>'))
    # targeterr = input('Input target error value.\n>>>')
    IO.setValuetoConfigfile(p.SAVED_PATH+MyNeuralNetwork.Name+'_profile.json', 'LearningAlgorithm', 'NesterovMomentum')
    IO.setValuetoConfigfile(p.SAVED_PATH+MyNeuralNetwork.Name+'_profile.json', 'Speed', speed)
    IO.setValuetoConfigfile(p.SAVED_PATH+MyNeuralNetwork.Name+'_profile.json', 'Momentum_Rate', momentumrate)
Exemplo n.º 7
0
def editAdaGrad(MyNeuralNetwork):
    speed = float(input('Input speed value.\n>>>'))
    # targeterr = input('Input target error value.\n>>>')
    IO.setValuetoConfigfile(
        p.SAVED_PATH + MyNeuralNetwork.Name + '_profile.json',
        'LearningAlgorithm', 'AdaGrad')
    IO.setValuetoConfigfile(
        p.SAVED_PATH + MyNeuralNetwork.Name + '_profile.json', 'Speed', speed)
    IO.setValuetoConfigfile(
        p.SAVED_PATH + MyNeuralNetwork.Name + '_profile.json', 'Epsilon',
        p.PROFILE_DEFAULT['Epsilon'])
Exemplo n.º 8
0
def loadNeuralNetwork():
    name = input('Input NeuralNetwork\'s name to be loaded.\n>>>')
    nn = NeuralNetwork.DFF()
    nn.loadfromFile(name)
    IO.setValuetoConfigfile('setting.json', 'latestNN', nn.Name)
    return nn
Exemplo n.º 9
0
def editTest1(MyNeuralNetwork):

    # targeterr = input('Input target error value.\n>>>')
    IO.setValuetoConfigfile(
        p.SAVED_PATH + MyNeuralNetwork.Name + '_profile.json',
        'LearningAlgorithm', 'Test1')
Exemplo n.º 10
0
def setValuetoConfigfile():
    listConfigfileValues()
    name = input('Name Code:\n>>>')
    value = input('Value:\n>>>')
    IO.setValuetoConfigfile('setting.json', ConfigDict[str(name)], value)