dnouri / gnumpy Goto Github PK
View Code? Open in Web Editor NEWA distutils package for gnumpy and npmat
License: Other
A distutils package for gnumpy and npmat
License: Other
mltest.docx
Hello,
I'm trying to run a deep learning algorithm. I followed the code from Adrian's tutorial.
I'm getting the following error:
File "mltest.py", line 4, in
from nolearn.dbn import DBN
File "C:\Users\User\AppData\Local\Programs\Python\Python35-32\lib\site-packages\nolearn\dbn.py", line 5, in
from gdbn.dbn import buildDBN
File "C:\Users\User\AppData\Local\Programs\Python\Python35-32\lib\site-packages\gdbn\dbn.py", line 25, in
import gnumpy as gnp
File "C:\Users\User\AppData\Local\Programs\Python\Python35-32\lib\site-packages\gnumpy.py", line 225
except _cudamat.CUDAMat Exception as e: # this means that malloc failed
^
SyntaxError: invalid syntax
I'm running Python 3.5.2, OpenCV 3.0, corresponding nolearn and scikit modules on Windows 10 Pro.
Can someone help me troubleshoot this issue?
Thank you,
File "/opt/conda/lib/python3.6/site-packages/gnumpy-0.2-py3.6.egg/gnumpy.py", line 52
except: print 'gnumpy: failed to import cudamat. Using npmat instead. No GPU will be used.'; _useGpu = 'no'
^
SyntaxError: Missing parentheses in call to 'print'. Did you mean print('gnumpy: failed to import cudamat. Using npmat instead. No GPU will be used.')?
import numpy as np
import gnumpy as gp
gp.garray(np.ones([10000,100000]))
garray([[ 1., 1., 1., ..., 1., 1., 1.],
[ 1., 1., 1., ..., 1., 1., 1.],
[ 1., 1., 1., ..., 1., 1., 1.],
...,
[ 1., 1., 1., ..., 1., 1., 1.],
[ 1., 1., 1., ..., 1., 1., 1.],
[ 1., 1., 1., ..., 1., 1., 1.]])
gp.garray(np.ones([100000,100000]))
Traceback (most recent call last):
File "", line 1, in
File "/users4/qkshi/anaconda2/lib/python2.7/site-packages/gnumpy.py", line 731, in init
if npa.size!=0: cm.numpy_array[:] = npa.reshape((-1, 1), order='C') # no cudamat.reformat is needed, because that's only dtype and order change, which are handled by the assignment anyway
ValueError: could not broadcast input array from shape (10000000000,1) into shape (1410065408,1)
when indexing a gnumpy.garray using a tuple of 2 lists of indices, gnumpy's implementation of __getitem__
method casts the lists to the native gpu data type which is 32 bit float. Therefore, due to floating point round errors, indexing is not correct for moderately large matrices.
Bug can be reproduced by the following code:
import gnumpy as gnp
a = gnp.randn(5000,5000)
if a.as_numpy_array()[([4001],[4001])] != a[([4001],[4001])]:
print 'bug!'
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.