This commit is contained in:
Willi Richert 2016-05-20 15:41:41 +02:00
Родитель 1f0ac9c2f1
Коммит 317fa84615
2 изменённых файлов: 2 добавлений и 6 удалений

Просмотреть файл

@ -49,9 +49,7 @@ def train_eval_logistic_regression_from_file(criterion_name=None,
my_sgd = C.SGDParams(
epoch_size=0, minibatch_size=25, learning_rates_per_mb=0.1, max_epochs=3)
with C.LocalExecutionContext('logreg') as ctx:
ctx.device_id = device_id
with C.LocalExecutionContext('logreg', device_id=device_id, clean_up=True) as ctx:
ctx.train(
root_nodes=[ce, eval],
training_params=my_sgd,

Просмотреть файл

@ -69,9 +69,7 @@ def train_eval_logistic_regression_with_numpy(criterion_name=None,
my_sgd = C.SGDParams(epoch_size=0, minibatch_size=25,
learning_rates_per_mb=0.1, max_epochs=3)
with C.LocalExecutionContext('logreg', clean_up=True) as ctx:
ctx.device_id = device_id
with C.LocalExecutionContext('logreg_numpy', device_id=device_id, clean_up=True) as ctx:
ctx.train(
root_nodes=[ce,eval],
training_params=my_sgd)