This file contains 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
class GistTest | |
def test | |
puts "testing..." | |
4.times { |i| puts i } | |
end | |
end |
This file contains 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 numpy as np | |
import theano | |
import theano.tensor as T | |
# mode = theano.compile.DebugMode(check_py_code=False, require_matching_strides=False) | |
mode = None | |
# theano.config.floatX = 'float64' | |
l = T.vector('l') |
This file contains 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
ERROR (theano.gof.opt): Optimization failure due to: local_gpu_elemwise_0 | |
ERROR (theano.gof.opt): TRACEBACK: | |
ERROR (theano.gof.opt): Traceback (most recent call last): | |
File "/home/sander/python_modules/theano/gof/opt.py", line 928, in process_node | |
replacements = lopt.transform(node) | |
File "/home/sander/python_modules/theano/sandbox/cuda/opt.py", line 170, in local_gpu_elemwise_0 | |
upcasted = node.op.make_node(*[tensor.cast(i, 'float32') for i in node.inputs]) | |
File "/home/sander/python_modules/theano/tensor/elemwise.py", line 470, in make_node | |
shadow = self.scalar_op.make_node(*[Scalar(dtype=i.type.dtype)() for i in inputs]) | |
File "/home/sander/python_modules/theano/scalar/basic.py", line 695, in make_node |
This file contains 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.tensor as T | |
import theano | |
import numpy as np | |
import gc | |
def freemem(): | |
gc.collect() | |
gc.collect() | |
gc.collect() | |
return theano.sandbox.cuda.cuda_ndarray.cuda_ndarray.mem_info()[0] / 1024**2 |
This file contains 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 numpy as np | |
import theano | |
import theano.tensor as T | |
def log_gamma_lanczos(z): | |
# reflection formula. Normally only used for negative arguments, | |
# but here it's also used for 0 < z < 0.5 to improve accuracy in this region. | |
flip_z = 1 - z | |
# because both paths are always executed (reflected and non-reflected), | |
# the reflection formula causes trouble when the input argument is larger than one. |
This file contains 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 numpy as np | |
import theano | |
import theano.tensor as T | |
def log_gamma_windschitl(z): | |
return 0.5 * (T.log(2*np.pi) - T.log(z) + z * (2 * T.log(z) - 2 + T.log(z * T.sinh(1/z) + 1 / (810*(z**6))))) |
This file contains 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
Error freeing device pointer 0x200605000 (unspecified launch failure). | |
!!!! error freeing device memory 0x200605000 (self=0x135d2f30) | |
Error freeing device pointer 0x20030a000 (unspecified launch failure). | |
!!!! error freeing dev_structure memory 0x20030a000 (self=0x135d2f30) | |
--------------------------------------------------------------------------- | |
RuntimeError Traceback (most recent call last) | |
/usr/lib/python2.7/site-packages/IPython/utils/py3compat.py in execfile(fname, *where) | |
173 else: | |
174 filename = fname | |
--> 175 __builtin__.execfile(filename, *where) |
This file contains 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
Error freeing device pointer 0x200605000 (unspecified launch failure). | |
!!!! error freeing device memory 0x200605000 (self=0x132d9630) | |
Error freeing device pointer 0x20030a000 (unspecified launch failure). | |
!!!! error freeing dev_structure memory 0x20030a000 (self=0x132d9630) | |
--------------------------------------------------------------------------- | |
RuntimeError Traceback (most recent call last) | |
/usr/lib/python2.7/site-packages/IPython/utils/py3compat.py in execfile(fname, *where) | |
173 else: | |
174 filename = fname | |
--> 175 __builtin__.execfile(filename, *where) |
This file contains 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 | |
def one_hot(t, r=None): | |
""" | |
given a tensor t of dimension d with integer values from range(r), return a | |
new tensor of dimension d + 1 with values 0/1, where the last dimension | |
gives a one-hot representation of the values in t. | |
This file contains 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
Error freeing device pointer 0x200800000 (the launch timed out and was terminated). | |
!!!! error freeing device memory 0x200800000 (self=0xa64f270) | |
Error freeing device pointer 0x200302400 (the launch timed out and was terminated). | |
!!!! error freeing dev_structure memory 0x200302400 (self=0xa64f270) | |
--------------------------------------------------------------------------- | |
MemoryError Traceback (most recent call last) | |
/usr/lib/python2.7/site-packages/IPython/utils/py3compat.pyc in execfile(fname, *where) | |
173 else: | |
174 filename = fname | |
--> 175 __builtin__.execfile(filename, *where) |
OlderNewer