Skip to content

Commit

Permalink
Fix demo typo (#2632)
Browse files Browse the repository at this point in the history
  • Loading branch information
RAMitchell authored and pommedeterresautee committed Aug 23, 2017
1 parent cd366ec commit 70071fc
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions demo/gpu_acceleration/cover_type.py
Expand Up @@ -29,12 +29,12 @@
gpu_res = {} # Store accuracy result
tmp = time.time()
# Train model
xgb.train(param, dtrain, numround, evals=[(dtest, 'test')], evals_result=gpu_res)
xgb.train(param, dtrain, num_round, evals=[(dtest, 'test')], evals_result=gpu_res)
print("GPU Training Time: %s seconds" % (str(time.time() - tmp)))

# Repeat for CPU algorithm
tmp = time.time()
param['tree_method'] = 'hist'
cpu_res = {}
xgb.train(param, dtrain, numround, evals=[(dtest, 'test')], evals_result=cpu_res)
xgb.train(param, dtrain, num_round, evals=[(dtest, 'test')], evals_result=cpu_res)
print("CPU Training Time: %s seconds" % (str(time.time() - tmp)))

0 comments on commit 70071fc

Please sign in to comment.