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

About downloading N-MNIST on master #304

Closed mountains-high closed 1 year ago

mountains-high commented 1 year ago

Good day,

While downloading N-MNIST dataset, I got this message:

anaconda3/envs/newsj/lib/python3.8/site-packages/spikingjelly-0.0.0.0.13-py3.8.egg/spikingjelly/datasets/__init__.py", line 692, in __init__
NotImplementedError: This dataset can not be downloaded by SpikingJelly, please download [Train.zip] from [https://www.garrickorchard.com/datasets/n-mnist] manually and put files at ../../../data/download.

I put Train.zip under the folder ../../../data/download/. However, it did not work. Could you help me to solve this issue, please?

Thank you ~

fangwei123456 commented 1 year ago

https://github.com/fangwei123456/spikingjelly/blob/77db4d189ded173689f9e8df113770523cfbe1a0/spikingjelly/datasets/n_mnist.py#L14

Hi, you can download Train.zip and Test.zip, save them to root/download, where root is a dir path, e.g., root = 'home/abc/nmnist'.

fangwei123456 commented 1 year ago

Then in your code, you should use train_set = n_mnist.NMNIST(root=root, ...).

mountains-high commented 1 year ago

Hello,

I'm sorry for late reply, I tried but it did not work:

parser.add_argument('-data-dir', default = './abc/nmnist/', type=str, help='root dir of  NMNIST dataset')

train_set = NMNIST(root=args.data_dir, train=True, data_type='frame', frames_number=args.T, split_by='number')
test_set = NMNIST(root=args.data_dir, train=False, data_type='frame', frames_number=args.T, split_by='number')

and Parent folder for "Train.zip" was /home/user/Desktop/spikingjelly_/nmnist_/abc/nmnist/download

Can I ask, maybe it is because of the

NotImplementedError: This dataset can not be downloaded by SpikingJelly, please download [Train.zip] from [https://www.garrickorchard.com/datasets/n-mnist] manually and put files at ./abc/nmnist/download.

(dot) after download? as(download.)?

Thank you

mountains-high commented 1 year ago

It worked after this, the problem was with the name "Train.zip", I am so sorry for my mistake.

:~/Desktop/spikingjelly_/nmnist_/abc/nmnist/download$ ls
 Test.zip  'Train .zip'

:~/Desktop/spikingjelly_/nmnist_/abc/nmnist/download$ mv 'Train .zip' Train.zip

Thank you for your help