nmi-lab / decolle-public

GNU General Public License v3.0
41 stars 22 forks source link

Error running test #4

Open giacomop96 opened 3 years ago

giacomop96 commented 3 years ago

Hi, I'm a newbie. I was trying to run train_lenet_decolle.py but i get this error: C:\Users\gpira\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.8_qbz5n2kfra8p0\LocalCache\local-packages\Python38\site-packages\decolle-0.1-py3.8.egg\decolle\utils.py:98: YAMLLoadWarning: calling yaml.load() without Loader=... is deprecated, as the default Loader is unsafe. Please read https://msg.pyyaml.org/load for full details. [2, 32, 32] Traceback (most recent call last): File "train_lenet_decolle_fa.py", line 39, in gen_train, gen_test = create_data(chunk_size_train=params['chunk_size_train'], File "C:\Users\gpira\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.8_qbz5n2kfra8p0\LocalCache\local-packages\Python38\site-packages\torchneuromorphic\nmnist\nmnist_dataloaders.py", line 170, in create_dataloader train_d, test_d = create_datasets( File "C:\Users\gpira\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.8_qbz5n2kfra8p0\LocalCache\local-packages\Python38\site-packages\torchneuromorphic\nmnist\nmnist_dataloaders.py", line 145, in create_datasets train_ds = NMNISTDataset(root,train=True, File "C:\Users\gpira\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.8_qbz5n2kfra8p0\LocalCache\local-packages\Python38\site-packages\torchneuromorphic\nmnist\nmnist_dataloaders.py", line 63, in init self.n = f['extra'].attrs['Ntrain'] File "h5py_objects.pyx", line 54, in h5py._objects.with_phil.wrapper File "h5py_objects.pyx", line 55, in h5py._objects.with_phil.wrapper File "C:\Users\gpira\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.8_qbz5n2kfra8p0\LocalCache\local-packages\Python38\site-packages\h5py-2.10.0-py3.8-win-amd64.egg\h5py_hl\attrs.py", line 60, in getitem attr = h5a.open(self._id, self._e(name)) File "h5py_objects.pyx", line 54, in h5py._objects.with_phil.wrapper File "h5py_objects.pyx", line 55, in h5py._objects.with_phil.wrapper File "h5py\h5a.pyx", line 77, in h5py.h5a.open KeyError: "Can't open attribute (can't locate attribute: 'Ntrain')"

I am no expert so I can't find the solution, can anyone help me?

eneftci commented 3 years ago

Hi Giacomo, I update the decolle library to the latest version. I believe there was a mismatch with torchneuromorphic bit it should be good now. Let me know if you're still having problems.

giacomop96 commented 3 years ago

Hi, I tried again with the new version but I get the same error as before.

eneftci commented 3 years ago

Try deleting the created hdf5 files and regenerating them. If you're running the train script without comments, it should be the N-MNIST dataset. Also remember to update torchneuromorphic.