Guest User

Untitled

a guest
Nov 21st, 2017
93
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.46 KB | None | 0 0
  1. for epoch in range(training_epochs):
  2. mean_cost = []
  3. cost = rbm.get_cost_updates(lr=learning_rate, k=k)
  4. print ('Training epoch %d, cost is ' % epoch, cost)
  5.  
  6. cost_plot(mean_cost_list)
  7. end_time = time.clock()
  8.  
  9. pretraining_time = (end_time - start_time)
  10.  
  11. print(('Training took %f minutes' % (pretraining_time / 60.)))
  12.  
  13. return rbm
  14.  
  15. def cost_plot(mean_cost):
  16. import pylab as plt
  17.  
  18. plt.plot(mean_cost, ',')
  19. plt.xlabel('epoch')
  20. plt.ylabel('mean cost')
  21. plt.savefig('result.png')
Add Comment
Please, Sign In to add comment