Comments (4)
Hi @elliothe Thank you for using BindsNET.
Unfortunately I'm not getting the error you got:
$ python3 eth_mnist.py --gpu
Loading training images from serialized object file.
Loading training labels from serialized object file.
Begin training.
Progress: 0 / 60000 (0.0000 seconds)
Progress: 10 / 60000 (10.3445 seconds)
Can you make sure that you running the latest version of PyTorch and BindsNET?
Also, please make sure that PyTorch using GPU properly using this link
from bindsnet.
Hi @Hananel-Hazan,
I did use the pip install bindsnet
to install the bindsnet under the conda environment.
There should be no problem for pytorch to use GPU.
Python 3.6.7 |Anaconda, Inc.| (default, Oct 23 2018, 19:16:44)
[GCC 7.3.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import torch
>>> torch.__version__
'1.0.0'
>>> torch.cuda.current_device()
0
>>>
from bindsnet.
I reinstall the bindsnet with the cloned repository, and it works. However, if I wanna enable the figure plot, the same error comes back.
python eth_mnist.py --plot --gpu
Loading training images from serialized object file.
Loading training labels from serialized object file.
Begin training.
Progress: 0 / 60000 (0.0000 seconds)
Traceback (most recent call last):
File "eth_mnist.py", line 150, in <module>
inpt_axes, inpt_ims = plot_input(images[i].view(28, 28), inpt, label=labels[i])
File "/home/elliot/Documents/DRC_2019/bindsnet-master/bindsnet/analysis/plotting.py", line 32, in plot_input
ims = axes[0].imshow(image, cmap='binary'), axes[1].imshow(inpt, cmap='binary')
File "/home/elliot/anaconda3/envs/pytorch_1.0/lib/python3.6/site-packages/matplotlib/__init__.py", line 1805, in inner
return func(ax, *args, **kwargs)
File "/home/elliot/anaconda3/envs/pytorch_1.0/lib/python3.6/site-packages/matplotlib/axes/_axes.py", line 5483, in imshow
im.set_data(X)
File "/home/elliot/anaconda3/envs/pytorch_1.0/lib/python3.6/site-packages/matplotlib/image.py", line 638, in set_data
self._A = cbook.safe_masked_invalid(A, copy=True)
File "/home/elliot/anaconda3/envs/pytorch_1.0/lib/python3.6/site-packages/matplotlib/cbook/__init__.py", line 784, in safe_masked_invalid
x = np.array(x, subok=True, copy=copy)
File "/home/elliot/anaconda3/envs/pytorch_1.0/lib/python3.6/site-packages/torch/tensor.py", line 450, in __array__
return self.numpy()
TypeError: can't convert CUDA tensor to numpy. Use Tensor.cpu() to copythe tensor to host memory first.
Morever, I found the code running on GPU is even slower than CPU version.
from bindsnet.
I pushed a fix to the plotting issue. Thank you for pointing it out
About the performance, the size of the network in this example is not enough to favorite GPU. CPU, in this case, will be faster (depending of course on the CPU model).
In much larger network, the GPU will be much faster. For example see the benchmark in link
from bindsnet.
Related Issues (20)
- Low accuracy HOT 9
- SWAT: A Spiking Neural Network Training Algorithm for Classification Problems HOT 1
- A (serious) bug preventing RL algorithms to work HOT 4
- Has anyone manage to make one of the RL examples to work? HOT 2
- Saving, loading, and performing prediction from supervised examples HOT 1
- Is there any way to use BindsNet on RTX 3090? HOT 1
- 'bindsnet' is not recognized as an internal or external command, operable program or batch file. HOT 2
- How would I run this type of setup? HOT 2
- Reservoir issues!
- Network converted from ANN doesn't retain weights after training? HOT 3
- Question: Can it be used for speech emotion recognition task? HOT 1
- Does the `poisson` function under-produce spikes? HOT 13
- THE DEAD NEURON PROBLEM HOT 14
- ModuleNotFoundError: No module named 'torch._six' HOT 5
- Is SingleEncoder timing-based? HOT 7
- Are learning rules such as gradient descent available? HOT 1
- ModuleNotFoundError: No module named 'torch._six' HOT 4
- Columns and DataType Not Explicitly Set on line 18 of plot_benchmark.py
- How backpropagation work? HOT 6
- Using bindsnet for temperature prediction? HOT 1
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 bindsnet.