Comments (14)
Hi. You have the same GPU as me, so thats convenient for testing :-) Question: can you provide a minimal python script to reprorduce the problem please? are you using python2.7 or python 3.something?
from deepcl.
(Like, for example, if I try:
from __future__ import print_function
import array
import PyDeepCL
import sys
print('imports done')
if len(sys.argv) != 2:
print(
'usage: python ' + sys.argv[0] +
' [mnist data directory (containing the .mat files)]')
sys.exit(-1)
mnistFilePath = sys.argv[1] + '/t10k-images-idx3-ubyte'
cl = PyDeepCL.DeepCL()
print('compute units:', cl.getComputeUnits())
print('local memory size, bytes:', cl.getLocalMemorySize())
print('local memory size, KB:', cl.getLocalMemorySizeKB())
print('max workgroup size:', cl.getMaxWorkgroupSize())
print('max alloc size MB:', cl.getMaxAllocSizeMB())
net = PyDeepCL.NeuralNet(cl, 1, 28)
print('created net')
print(net.asString())
print('printed net')
net.addLayer(PyDeepCL.NormalizationLayerMaker().translate(-0.5).scale(1/255.0))
print('added layer ')
PyDeepCL.NetdefToNet.createNetFromNetdef(
net, "rt2-8c5z-relu-mp2-16c5z-relu-mp3-150n-tanh-10n")
print(net.asString())
(N, planes, size) = PyDeepCL.GenericLoader.getDimensions(mnistFilePath)
print((N, planes, size))
N = 1280
images = array.array('f', [0] * (N * planes * size * size))
labels = array.array('i', [0] * N)
PyDeepCL.GenericLoader.load(mnistFilePath, images, labels, 0, N)
print('loaded data')
sgd = PyDeepCL.SGD(cl, 0.002, 0.0)
print('created SGD')
sgd.setWeightDecay(0.0001)
netLearner = PyDeepCL.NetLearner(
sgd, net,
N, images, labels,
N, images, labels,
128)
print('created netLearner')
netLearner.setSchedule(12)
netLearner.run()
print('done, cleaning up...')
... this works ok for me. but coulld be a difference in our compilation options perhaps)
from deepcl.
It sounds like a problem I had, that was fixed actually, which I fixed by converting from string
to const char *
for ActivationFunction::getDefineName()
. can you confirm the git log pleaes?
git log -n 5 --oneline
On my box I get something like:
d45b6de remove include_dirs
573deb7 remove mac build warning for softmaxlayer
f4fad72 remove build warning on mac
e3fb8c7 remove warning on Mac
8dff0d1 remove mac os x build warnings
from deepcl.
Here's my git log:
573deb7 remove mac build warning for softmaxlayer
f4fad72 remove build warning on mac
e3fb8c7 remove warning on Mac
8dff0d1 remove mac os x build warnings
309c543 change directory in travis
And here's a script it will break on:
cl = PyDeepCL.DeepCL()
net = PyDeepCL.NeuralNet(cl, 1, 28)
net.addLayer(PyDeepCL.NormalizationLayerMaker().translate(-0.5).scale(1/255.0))
PyDeepCL.NetdefToNet.createNetFromNetdef(
net, "rt2-8c5z-tanh-5n")
With relu causing the same error as tanh above. I compiled with cmake -DCMAKE_BUILD_TYPE=Debug ..
, to force fn to not be optimized out, and it looks like the root issue is a seg fault on any fn->foo() call. Although my repo is up to date, it might be another part of the library I broke (I've recently been playing around a lot with the DeepCL/EasyCL library). I'll try starting with a new install of DeepCL and see if that resolves it.
Thanks for your fast reply!
from deepcl.
I'm getting the same error on a completely new install up to date with the master
d45b6de remove include_dirs
573deb7 remove mac build warning for softmaxlayer
f4fad72 remove build warning on mac
e3fb8c7 remove warning on Mac
8dff0d1 remove mac os x build warnings
from deepcl.
Ok, interesting. Please can you confirm:
- what OS you are using, and what version?
- what version of python your are using?
(Update: the test code above runs ok for me. So I guess it is related to some difference in our OS, or python version)
from deepcl.
(Note: I added your test to my Mac OS X travis script ,and seems to work ok: https://travis-ci.org/hughperkins/DeepCL/builds/115800365#L2384 https://github.com/hughperkins/DeepCL/blob/travis-tweaks/travis/simpletest.py#L37 So, seems to work on Ubuntu 15.10, and Mac OS X. I guess that leaves ... Windows?)
from deepcl.
(updated python wrappers slightly to implement __str_
https://travis-ci.org/hughperkins/DeepCL/builds/115806497#L2395 , to give more convincing output )
from deepcl.
(added test for python2.7 too https://travis-ci.org/hughperkins/DeepCL/builds/115809055#L2413 https://travis-ci.org/hughperkins/DeepCL/builds/115809055#L2540 https://github.com/hughperkins/DeepCL/blob/travis-tweaks/.travis.yml#L65-L69 )
from deepcl.
I'm actually using Ubuntu 15.10 with Python 2.7.11 :: Anaconda 2.5.0 (64-bit)
. Not sure why this only appears on my system... I might've broken something arcane.
from deepcl.
Hmmm, I'm using Ubuntu 15.10 too...
from deepcl.
How about:
pip uninstall -y DeepCL
... and then do a fresh git clone of DeepCL, and rebuild/reinstall?
from deepcl.
Worked :) Thanks for your help debugging (and building the library!)
from deepcl.
Cool :-)
from deepcl.
Related Issues (20)
- clBlas error HOT 5
- MNIST data format HOT 1
- Python Q-Learning - Add Dropout Layout causes runtime error HOT 11
- can passed all test in #ad1ab61, but not now (#b256220) HOT 48
- function "NetLearner::learn" is deprecated, how to train a network by the new method? HOT 2
- How to use ExpectedData correctly in training? HOT 2
- tutorial and documentation is very less
- integrated demo HOT 2
- could deepcl run on FPGAs? HOT 1
- deepcl_predict HOT 5
- does the Neural network created on GPU? HOT 3
- captcha
- pip with windows does not work
- Need cythonize
- deepcl_unittests not running in CentOS 7. HOT 2
- opencl 1.1?
- Feature Request: Add Mish activation HOT 3
- How to set stride of conv layer? HOT 2
- Implementation of DNN on FPGA HOT 2
- Any examples for face detection?
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from deepcl.