This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| [... snipped away lotsof Quadtree inserts ...] | |
| #104785 0x00000001000021ae in QuadTree::insert (this=0x1021d6e00, new_index=553) at quadtree.cpp:154 | |
| #104786 0x0000000100002235 in QuadTree::insert (this=0x1021d6a10, new_index=553) at quadtree.cpp:157 | |
| #104787 0x00000001000021ae in QuadTree::insert (this=0x1021d6980, new_index=553) at quadtree.cpp:154 | |
| #104788 0x0000000100002235 in QuadTree::insert (this=0x1021d6590, new_index=553) at quadtree.cpp:157 | |
| #104789 0x00000001000021ae in QuadTree::insert (this=0x1021d63e0, new_index=553) at quadtree.cpp:154 | |
| #104790 0x00000001000021dc in QuadTree::insert (this=0x1021d61a0, new_index=553) at quadtree.cpp:155 | |
| #104791 0x00000001000021dc in QuadTree::insert (this=0x1021d5ff0, new_index=553) at quadtree.cpp:155 | |
| #104792 0x0000000100002207 in QuadTree::insert (this=0x1021d5e40, new_index=553) at quadtree.cpp:156 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import time | |
| import numpy as np | |
| from numba import jit, float64, int64 | |
| def mean_filter(X, window_size): | |
| filtered = np.empty(X.shape) | |
| starts = window_size * [0] + range(1, X.shape[0] - window_size + 1) | |
| for i in range(X.shape[0]): |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /Users/bayerj/devel/Theano/theano/compile/function.pyc in function(inputs, outputs, mode, updates, givens, no_default_updates, accept_inplace, name, rebuild_strict, allow_input_downcast, profile, on_unused_input) | |
| 204 allow_input_downcast=allow_input_downcast, | |
| 205 on_unused_input=on_unused_input, | |
| --> 206 profile=profile) | |
| 207 # We need to add the flag check_aliased inputs if we have any mutable or | |
| 208 # borrowed used defined inputs | |
| /Users/bayerj/devel/Theano/theano/compile/pfunc.pyc in pfunc(params, outputs, mode, updates, givens, no_default_updates, accept_inplace, name, rebuild_strict, allow_input_downcast, profile, on_unused_input) | |
| 480 return orig_function(inputs, cloned_outputs, mode, | |
| 481 accept_inplace=accept_inplace, name=name, profile=profile, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| .../Users/bayerj/devel/Theano/theano/compile/debugmode.py:1610: UserWarning: FunctionGraph.nodes is deprecated, it has been renamed 'apply_nodes' | |
| e.toposort = lambda: e.nodes # WARNING: STOCHASTIC ORDER | |
| ...........S........................K............../Users/bayerj/devel/Theano/theano/compile/tests/test_inplace_opt_for_value.py:170: UserWarning: theano modules are deprecated and will be removed in release 0.7 | |
| super(ExampleRNN, self).__init__() | |
| .............................................................................................WARNING (theano.gof.cmodule): Cache leak due to unpickle-able key data set([(((1,), (10, '1.8.0.dev-dff8c94'), (10, '1.8.0.dev-dff8c94')), ('CLinker.cmodule_key', ('-O3', '-Wno-unused-label', '-Wno-unused-variable', '-Wno-write-strings', '-fno-math-errno'), (), (), 'NPY_ABI_VERSION=0x1000009', 'c_compiler_str=g++ 4.2.1', 'md5:b9113ad2b1dcb7629164b394f0809469', (<theano.gof.tests.test_compute_test_value.IncOneC object at 0x109c0cb10>, ((Scalar(int32), ((-1, 0), False)),), |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import theano | |
| import theano.tensor as T | |
| import gnumpy | |
| import theano.misc.gnumpy_utils as gput | |
| g = gnumpy.zeros((1, 2)) | |
| g += np.array([[2, 1]]) | |
| x = T.matrix() | |
| expr = 2 * x |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| def q_mult(q1, q2): | |
| w1, x1, y1, z1 = q1[:, 0], q1[:, 1], q1[:, 2], q1[:, 3] | |
| w2, x2, y2, z2 = q2[:, 0], q2[:, 1], q2[:, 2], q2[:, 3] | |
| w = w1 * w2 - x1 * x2 - y1 * y2 - z1 * z2 | |
| x = w1 * x2 + x1 * w2 + y1 * z2 - z1 * y2 | |
| y = w1 * y2 + y1 * w2 + z1 * x2 - x1 * z2 | |
| z = w1 * z2 + z1 * w2 + x1 * y2 - y1 * x2 | |
| if isinstance(q1, np.ndarray): | |
| w = w[:, np.newaxis] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Traceback (most recent call last): | |
| File "theanorngclone.py", line 12, in <module> | |
| f = theano.function([x_sub], samples_sub) | |
| File "/Users/bayerj/devel/Theano/theano/compile/function.py", line 222, in function | |
| profile=profile) | |
| File "/Users/bayerj/devel/Theano/theano/compile/pfunc.py", line 506, in pfunc | |
| on_unused_input=on_unused_input) | |
| File "/Users/bayerj/devel/Theano/theano/compile/function_module.py", line 1298, in orig_function | |
| on_unused_input=on_unused_input).create( | |
| File "/Users/bayerj/devel/Theano/theano/compile/function_module.py", line 994, in __init__ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| numpydoc>=0.4 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| dot = (target[:, :, 3:7] * prediction[:, :, 6:10]).sum(axis=2).dimshuffle(0, 1, 'x') | |
| dot = T.clip(dot, -.99, .99) | |
| angle_loss = T.arccos(dot) | |
| return residuals ** 2 + c * angle_loss |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import theano, theano.tensor as T | |
| from theano.tensor.shared_randomstreams import RandomStreams | |
| def theano_expr_bfs(expr): | |
| stack = [expr] | |
| while True: | |
| if not stack: | |
| break | |
| expr = stack.pop() |