fangwei123456 / spikingjelly

SpikingJelly is an open-source deep learning framework for Spiking Neural Network (SNN) based on PyTorch.
https://spikingjelly.readthedocs.io
Other
1.35k stars 239 forks source link

Impossible to import spikinjelly - event based on Colab if no GPUs are available #317

Open NicolaCST opened 1 year ago

NicolaCST commented 1 year ago

Issue type

SpikingJelly version latest

Description Hi, im currently using spikingjelly on Colab. If there are no GPUs available, it is impossible to use the latest version of this library. Without GPUs it is impossible to import the 'cupy' library, and as a consequence, it became impossible to use spikinjelly. However i can still use the old version, but i should modify a lot my code. Something i can do about that, or should i just avoid Colab ? @fangwei123456

Minimal code to reproduce the error/bug

import spikingjelly
from spikingjelly.clock_driven import neuron,encoding, functional, surrogate, layer
fangwei123456 commented 1 year ago

It seems that you are using old version, rather than the latest version?

NicolaCST commented 1 year ago

Uhm that was a mistake by me, the actual module that i'm using is the activation_based..

import spikingjelly
from spikingjelly.activation_based import neuron, encoding, functional, surrogate, layer
from spikingjelly import visualizing
fangwei123456 commented 1 year ago

OK, I will check if these codes will raise an error when cupy is not installed.

fangwei123456 commented 1 year ago

I just fix this bug. You can use git pull to update SJ and reinstall it again.