diff options
| author | jeanpouget-abadie <jean.pougetabadie@gmail.com> | 2015-12-02 16:16:07 -0500 |
|---|---|---|
| committer | jeanpouget-abadie <jean.pougetabadie@gmail.com> | 2015-12-02 16:16:07 -0500 |
| commit | 0e90119296f6bbbaf28fbaa329556d6d9cd86f3f (patch) | |
| tree | b7398da425f071ce64d960eb560af54eca6f2012 /simulation/utils_blocks.py | |
| parent | de815c196ad03e5d76cc675696b9cd7c1b3b3fbb (diff) | |
| download | cascades-0e90119296f6bbbaf28fbaa329556d6d9cd86f3f.tar.gz | |
changes in if __name__ part of files
Diffstat (limited to 'simulation/utils_blocks.py')
| -rw-r--r-- | simulation/utils_blocks.py | 5 |
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) |
