From 009c8ff7570105a79278559202fdd46616b83a92 Mon Sep 17 00:00:00 2001 From: Sander Vrijders Date: Thu, 20 Apr 2017 17:12:34 +0200 Subject: model: Split experiment run() This splits experiment.run() into 4 different operations: swap_in, install_prototype, bootstrap_prototype and swap_out. --- examples/example.py | 6 +++++- examples/two-layers.py | 6 +++++- 2 files changed, 10 insertions(+), 2 deletions(-) (limited to 'examples') diff --git a/examples/example.py b/examples/example.py index 54ecd37..8d91102 100755 --- a/examples/example.py +++ b/examples/example.py @@ -40,4 +40,8 @@ exp = rl.Experiment(tb, nodes = [a, b]) print(exp) -exp.run() +try: + exp.swap_in() + exp.bootstrap_prototype() +finally: + exp.swap_out() diff --git a/examples/two-layers.py b/examples/two-layers.py index 9032588..fff3866 100755 --- a/examples/two-layers.py +++ b/examples/two-layers.py @@ -52,4 +52,8 @@ exp = rl.Experiment(tb, nodes = [a, b, c, d]) print(exp) -exp.run() +try: + exp.swap_in() + exp.bootstrap_prototype() +finally: + exp.swap_out() -- cgit v1.2.3