我使用 Windows 和 Python 的 Anaconda 发行版和 git bash 来读取 .sh 文件。我无法在此处安装文件: https ://github.com/TalwalkarLab/leaf/tree/master/data/femnist
我使用 git bash 和命令 git clone https://github.com/TalwalkarLab/leaf.git在 python 中克隆了叶文件夹
正如 /femnist 中的 readme.md 文件所建议的那样,我尝试运行 preprocess.sh (首先没有特定参数)
我首先遇到了麻烦,因为 shell 不知道“python3”是什么,所以我复制了“python.exe”并将其重命名为“python3.exe”。
当我使用 cd {path where we can find preprocess.sh} 进入 git bash 时,我尝试运行 preprocess.sh 并获得:
IS234906+admin-local@IS234906 MINGW64 ~/Desktop/CEA/femnist/leaf/data/femnist (master)
$ ./preprocess.sh
------------------------------
extracting file directories of images
Traceback (most recent call last):
File "get_file_dirs.py", line 27, in <module>
classes = os.listdir(class_dir)
FileNotFoundError: [WinError 3] The specified path cannot be found: 'C:\\Users\\admin-local\\Desktop\\CEA\\femnist\\leaf\\data\\femnist\\data\\raw_data\\by_class'
finished extracting file directories of images
------------------------------
calculating image hashes
Traceback (most recent call last):
File "get_hashes.py", line 15, in <module>
class_file_dirs = util.load_obj(cfd)
File "C:\Users\admin-local\Desktop\CEA\femnist\leaf\data\utils\util.py", line 10, in load_obj
with open(name + '.pkl', 'rb') as f:
FileNotFoundError: [Errno 2] No such file or directory: 'C:\\Users\\admin-local\\Desktop\\CEA\\femnist\\leaf\\data\\femnist\\data\\intermediate\\class_file_dirs.pkl'
finished calculating image hashes
------------------------------
如果有人知道我应该做什么,那会对我有很大帮助。
提前谢谢大家,祝你有美好的一天!
RISEBY
相关分类