aboutsummaryrefslogtreecommitdiffstats
path: root/simulation/utils_blocks.py
diff options
context:
space:
mode:
authorjeanpouget-abadie <jean.pougetabadie@gmail.com>2015-12-02 16:16:07 -0500
committerjeanpouget-abadie <jean.pougetabadie@gmail.com>2015-12-02 16:16:07 -0500
commit0e90119296f6bbbaf28fbaa329556d6d9cd86f3f (patch)
treeb7398da425f071ce64d960eb560af54eca6f2012 /simulation/utils_blocks.py
parentde815c196ad03e5d76cc675696b9cd7c1b3b3fbb (diff)
downloadcascades-0e90119296f6bbbaf28fbaa329556d6d9cd86f3f.tar.gz
changes in if __name__ part of files
Diffstat (limited to 'simulation/utils_blocks.py')
-rw-r--r--simulation/utils_blocks.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/simulation/utils_blocks.py b/simulation/utils_blocks.py
index 72a6881..00b429e 100644
--- a/simulation/utils_blocks.py
+++ b/simulation/utils_blocks.py
@@ -37,7 +37,10 @@ class ActiveLearning(be.SimpleExtension):
self.params = params
def do(self, which_callback, *args):
- exp_out_par = np.exp(np.sum(self.params, axis=1))
+ try:
+ exp_out_par = np.exp(np.sum(self.params.get_value(), axis=1))
+ except AttributeError:
+ exp_out_par = np.exp(np.sum(self.params, axis=1))
self.dataset.node_p = exp_out_par / np.sum(exp_out_par)