miladmozafari / SpykeTorch

High-speed simulator of convolutional spiking neural networks with at most one spike per neuron.
GNU General Public License v3.0
382 stars 101 forks source link

No such file or directory: 'facemotortrain' #13

Closed QianpengLi577 closed 2 years ago

QianpengLi577 commented 2 years ago

Hello,

when I run MozafariShallow.py, error occurs

python MozafariShallow.py
Traceback (most recent call last):
  File "MozafariShallow.py", line 127, in <module>
    trainsetfolder = utils.CacheDataset(ImageFolder("facemotortrain", s1c1))
  File "/home/liqp/.local/lib/python3.6/site-packages/torchvision/datasets/folder.py", line 229, in __init__
    is_valid_file=is_valid_file)
  File "/home/liqp/.local/lib/python3.6/site-packages/torchvision/datasets/folder.py", line 108, in __init__
    classes, class_to_idx = self._find_classes(self.root)
  File "/home/liqp/.local/lib/python3.6/site-packages/torchvision/datasets/folder.py", line 137, in _find_classes
    classes = [d.name for d in os.scandir(dir) if d.is_dir()]
FileNotFoundError: [Errno 2] No such file or directory: 'facemotortrain'
miladmozafari commented 2 years ago

Hello,

You need to replace the value with an address to the directory on your machine that contains 'face' and 'motorbike' images.