瀏覽代碼

Add prints to follow the progression of session

DricomDragon 5 年之前
父節點
當前提交
0d406daddb
共有 1 個文件被更改,包括 8 次插入1 次删除
  1. 8 1
      python/start_session.py

+ 8 - 1
python/start_session.py

@@ -1,7 +1,7 @@
 #!/usr/bin/python3
 
 # File designed to be launched by user
-print("Start session")
+print("Start script")
 
 # Import python libraries
 from scipy.special import expit
@@ -26,14 +26,21 @@ activation = expit
 activationDerivative = lambda x : expit(x) * (1 - expit(x))
 
 # Session
+print("Start session")
+print("... generating neural network ...")
 network = generator.generate(activation, activationDerivative, generator.gaussAdaptedDev)
 
+print("... compute precision before training ... ")
 precisionBefore = benchmark.computePrecision(network)
 
+print("... train the network (can take a while) ... ")
 network = trainer.train(network, args.learnRate, args.epochs)
 
+print("... compute precision after training ... ")
 precisionAfter = benchmark.computePrecision(network)
 
+print("End of session")
+
 # Display results
 print("Precision before training : ", precisionBefore)
 print("Precision after training : ", precisionAfter)