楼主: Lisrelchen
1634 14

[Microsoft Cognitive Toolkit]Classify Cancer Using Feed Forward Network [推广有奖]

11
Lisrelchen 发表于 2017-9-17 02:36:18
  1. # Compute the moving average loss to smooth out the noise in SGD
  2. plotdata["avgloss"] = moving_average(plotdata["loss"])
  3. plotdata["avgerror"] = moving_average(plotdata["error"])

  4. # Plot the training loss and the training error
  5. import matplotlib.pyplot as plt

  6. plt.figure(1)
  7. plt.subplot(211)
  8. plt.plot(plotdata["batchsize"], plotdata["avgloss"], 'b--')
  9. plt.xlabel('Minibatch number')
  10. plt.ylabel('Loss')
  11. plt.title('Minibatch run vs. Training loss')

  12. plt.show()

  13. plt.subplot(212)
  14. plt.plot(plotdata["batchsize"], plotdata["avgerror"], 'r--')
  15. plt.xlabel('Minibatch number')
  16. plt.ylabel('Label Prediction Error')
  17. plt.title('Minibatch run vs. Label Prediction Error')
  18. plt.show()
复制代码

12
MouJack007 发表于 2017-9-17 03:12:21
谢谢楼主分享!

13
MouJack007 发表于 2017-9-17 03:12:47

14
ccwwccww 发表于 2017-9-17 11:27:27

15
钱学森64 发表于 2017-9-17 17:21:51
谢谢分享

您需要登录后才可以回帖 登录 | 我要注册

本版微信群
加好友,备注jltj
拉您入交流群
GMT+8, 2026-1-1 03:28