コード例 #1
0
ファイル: main.py プロジェクト: 226252/PAMSI
#writing a circle of pixels to the array according to middle coordinates of mouse position

plotter=Plotter()
NN=Neural_Network()

if input("Wanna train model? y/N ") =='y':
    layers = [800,400]
    NN.initialize(layers)
    NN.train(20)
   
    if input("Wanna save model? Y/n ") !='n' :
        NN.save_model()

        
elif input("Wanna load from file? Y/n ")!='n' :
    NN.load_model()

else :
    print("Exit")
    exit()  
    
    
# Fit the model
# Final evaluation of the model
if input("Wanna test model? y/N ") =='y':
    NN.test()

#space for insertion of numpy array from user:
while input("Wanna input some stuff? Y/n ")!='n':
    
    NN.predict(plotter.input_stuff())