亚洲在线久爱草,狠狠天天香蕉网,天天搞日日干久草,伊人亚洲日本欧美

為了賬號安全,請及時綁定郵箱和手機立即綁定
已解決430363個問題,去搜搜看,總會有你想問的

如何從github下載這些文件?

如何從github下載這些文件?

翻閱古今 2023-01-04 14:19:16
我使用 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 imagesTraceback (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 hashesTraceback (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------------------------------如果有人知道我應該做什么,那會對我有很大幫助。提前謝謝大家,祝你有美好的一天!
查看完整描述

1 回答

?
RISEBY

TA貢獻1856條經驗 獲得超5個贊

我注意到的第一件事是你說你的 shell 不知道 python3 是什么。這意味著您需要在計算機上實際安裝 python3。重命名 python.exe 不是有效的解決方法。在您的終端中,您需要運行python3 --version. 如果這沒有向您返回 python3 版本號,那么您就知道您沒有安裝 python3。Python 3.7 可以從 Windows 商店或從https://www.python.org/downloads/windows/安裝

之后,并使用 重新克隆整個存儲庫git clone https://github.com/TalwalkarLab/leaf.git,您將需要使用pip3 install -r requirements.txt終端命令在存儲庫的根目錄中安裝自述文件中提到的軟件包。

從那里完成此高級安裝,現在您可以使用cd data/femnist輸入數據集的目錄。最后,運行命令bash ./preprocess.sh

我遵循了這些確切的步驟(但是,我在 Mac OSX 上),并且能夠以這種方式下載所有數據。

請讓我知道嘗試我的解決方案的結果,如果可以的話,我很樂意提供更多見解!


查看完整回答
反對 回復 2023-01-04
  • 1 回答
  • 0 關注
  • 129 瀏覽
慕課專欄
更多

添加回答

舉報

0/150
提交
取消
微信客服

購課補貼
聯系客服咨詢優惠詳情

幫助反饋 APP下載

慕課網APP
您的移動學習伙伴

公眾號

掃描二維碼
關注慕課網微信公眾號