Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- for epoch in range(training_epochs):
- mean_cost = []
- cost = rbm.get_cost_updates(lr=learning_rate, k=k)
- print ('Training epoch %d, cost is ' % epoch, cost)
- cost_plot(mean_cost_list)
- end_time = time.clock()
- pretraining_time = (end_time - start_time)
- print(('Training took %f minutes' % (pretraining_time / 60.)))
- return rbm
- def cost_plot(mean_cost):
- import pylab as plt
- plt.plot(mean_cost, ',')
- plt.xlabel('epoch')
- plt.ylabel('mean cost')
- plt.savefig('result.png')
Add Comment
Please, Sign In to add comment