jeshraghian / snntorch

Deep and online learning with spiking neural networks in Python
https://snntorch.readthedocs.io/en/latest/
MIT License
1.17k stars 202 forks source link

DVS_Gesture dataset from spikevision.spikedata not working #285

Closed githubofaliyev closed 4 months ago

githubofaliyev commented 5 months ago

I get the this KeyError: "Unable to open object (object 'labels' doesn't exist)" Here is the lines of code that lead to this error _trainset = spikedata.DVSGesture(data_dir, train=True, num_steps=100, dt=3000, ds=4) trainloader = DataLoader(trainset, batchsize=32, shuffle=True) data, targets = next(iter(trainloader)).

Then from here it throws this error at this line.

label = dset["labels"][()]

I suspected that hdf files being created so I added self._create_hdf5() after this line https://github.com/jeshraghian/snntorch/blob/bf763fdf5138e976b085a700cc12e6ec3f5d1a44/snntorch/spikevision/spikedata/dvs_gesture.py#L204

but that threw a different error like lbl_dst not being created here https://github.com/jeshraghian/snntorch/blob/bf763fdf5138e976b085a700cc12e6ec3f5d1a44/snntorch/spikevision/spikedata/dvs_gesture.py#L372. (btw, why these lines are commented out here?)

Could this be somewhat due to the version upgrades in pytorch? or certain commits caused this break?

jeshraghian commented 5 months ago

spikevision has been deprecated; I'd look at using tonic to load DVSGesture data instead.

Link: https://tonic.readthedocs.io/en/latest/autoapi/tonic/datasets/dvsgesture/index.html