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 | |
| X = T.matrix() | |
| expr = X.shape[0] | |
| f = theano.function([X], expr) | |
| print f([[1, 2], [2, 3]]) |
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
| floatX (('float64', 'float32')) | |
| Doc: Default floating-point precision for python casts | |
| Value: float64 | |
| device (('cpu', 'gpu', 'gpu0', 'gpu1', 'gpu2', 'gpu3', 'gpu4', 'gpu5', 'gpu6', 'gpu7', 'gpu8', 'gpu9', 'gpu10', 'gpu11', 'gpu12', 'gpu13', 'gpu14', 'gpu15')) | |
| Doc: Default device for computations. If gpu*, change the default to try to move computation to it and to put shared variable of float32 on it. | |
| Value: cpu | |
| init_gpu_device (('', 'gpu', 'gpu0', 'gpu1', 'gpu2', 'gpu3', 'gpu4', 'gpu5', 'gpu6', 'gpu7', 'gpu8', 'gpu9', 'gpu10', 'gpu11', 'gpu12', 'gpu13', 'gpu14', 'gpu15')) | |
| Doc: Initialize the gpu device to use, works only if device=cpu. Unlike 'device', setting this option will NOT move computations, nor shared variables, to the specified GPU. It can be used to run GPU-specific tests on a particular GPU. |
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
| Failed to infer_shape from Op Subtensor{1:9223372036854775807:}. | |
| Input shapes:[(Elemwise{add,no_inplace}.0, Subtensor{1}.0)] | |
| Exception encountered during infer_shape: <type 'exceptions.AssertionError'> | |
| Exception message: | |
| Traceback: Traceback (most recent call last): | |
| File "/Users/bayerj/devel/third-party/Theano/theano/tensor/opt.py", line 721, in on_import | |
| o_shapes = shape_infer(node, [self.shape_of[r] for r in node.inputs]) | |
| File "/Users/bayerj/devel/third-party/Theano/theano/tensor/basic.py", line 2863, in infer_shape | |
| assert len(xshp) == node.inputs[0].ndim | |
| AssertionError |
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 scipy | |
| import theano | |
| import theano.tensor as T | |
| # Define variables. | |
| W = T.matrix('weights') | |
| x = T.matrix('features') | |
| z = T.matrix('targets') | |
| # Define model. (Yes, no bias, I am lazy) |
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
| asdasd#in older versions of Xcode4 you may need to set PRODUCT_NAME manually | |
| DIST_LIST=<TestFlight Distribution List name here> | |
| API_TOKEN=<TestFlight API token here> | |
| TEAM_TOKEN=<TestFlight team token here> | |
| SIGNING_IDENTITY="iPhone Distribution: Development Seed" | |
| PROVISIONING_PROFILE="${HOME}/Library/MobileDevice/Provisioning Profiles/MapBox Ad Hoc.mobileprovision" | |
| LOG="/tmp/testflight.log" | |
| DATE=$( /bin/date +"%Y-%m-%d" ) |
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
| diff --git a/theano/tensor/basic.py b/theano/tensor/basic.py | |
| index f9e7240..091486b 100644 | |
| --- a/theano/tensor/basic.py | |
| +++ b/theano/tensor/basic.py | |
| @@ -5091,6 +5091,7 @@ class AdvancedSubtensor(Op): | |
| rest = inputs[1:] | |
| return [AdvancedIncSubtensor(self.args)(zeros_like(x), gz, *rest)] + [None]*len(rest) | |
| + | |
| class AdvancedIncSubtensor(Op): |
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
| $ py -c 'import zmq' | |
| Traceback (most recent call last): | |
| File "<string>", line 1, in <module> | |
| File "/Library/Python/2.6/site-packages/zmq/__init__.py", line 38, in <module> | |
| from zmq import core, devices | |
| File "/Library/Python/2.6/site-packages/zmq/core/__init__.py", line 26, in <module> | |
| from zmq.core import (constants, error, message, context, | |
| ImportError: dlopen(/Library/Python/2.6/site-packages/zmq/core/error.so, 2): Symbol not found: _zmq_errno | |
| Referenced from: /Library/Python/2.6/site-packages/zmq/core/error.so | |
| Expected in: flat namespace |
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 scipy | |
| import theano, theano.tensor as T | |
| # Create parameters. | |
| # | |
| # Parameters are first allocated in a long consecutive array as a shared | |
| # variable. Afterwards, reshaped subtensors are used in the expressions in. | |
| # Why? We want to be able to differentiate wrt groups of parameters which | |
| # are in consecutive memory. |
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 scipy | |
| import theano, theano.tensor as T | |
| # Create parameters. | |
| # | |
| # Parameters are first allocated in a long consecutive array as a shared | |
| # variable. Afterwards, reshaped subtensors are used in the expressions in. | |
| # Why? We want to be able to differentiate wrt groups of parameters which | |
| # are in consecutive memory. |
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 | |
| inpt = T.vector('inpt') | |
| W = T.matrix('weights') | |
| output = T.dot(inpt, W) | |
| d_output_wrt_inpt, _ = theano.map(lambda i: T.grad(output[i], inpt), | |
| T.arange(output.shape[0])) | |
| f = theano.function([inpt, W], d_output_wrt_inpt) |