Giter VIP home page Giter VIP logo

gnumpy's People

Contributors

dnouri avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

gnumpy's Issues

Python 3.5.2 gnump/CUDAmat error

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,

Error Missing parentheses in call to 'print'

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.')?

python 2.7 numpy array cast error

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)

bug when indexing using a tuple of lists

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!'

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.