diff --git a/code_notes/正确安装PyTorch GPU版本.txt b/code_notes/正确安装PyTorch GPU版本.txt new file mode 100644 index 0000000..7d203c9 --- /dev/null +++ b/code_notes/正确安装PyTorch GPU版本.txt @@ -0,0 +1,16 @@ +###### 建议pip安装 +# 首先卸载 +pip3 uninstall torch -y +pip3 uninstall torchvision -y +pip3 uninstall torchaudio -y + +# 然后安装 +pip3 install torch==2.1.0+cu121 torchvision==0.16.0+cu121 torchaudio==2.1.0+cu121 -f https://download.pytorch.org/whl/cu121/torch_stable.html + + +###### conda安装 +# 首先卸载完全卸载pytorch +conda uninstall pytorch torchvision torchaudio pytorch-cuda=11.8 -c pytorch -y + +# 然后安装 待实验 +# conda install pytorch==2.1.0+cu121 torchvision==2.1.0+cu121 torchaudio==2.1.0+cu121 pytorch-cuda=12.1 -c pytorch -c nvidia diff --git a/杭州日电量/Conda正确安装PyTorch GPU版本.txt b/杭州日电量/Conda正确安装PyTorch GPU版本.txt deleted file mode 100644 index 6b5882d..0000000 --- a/杭州日电量/Conda正确安装PyTorch GPU版本.txt +++ /dev/null @@ -1,5 +0,0 @@ -# 首先卸载 -conda uninstal torch torchvision torchaudio -y - -# 然后安装 -conda install pytorch==2.1.0+cu121 torchvision==2.1.0+cu121 torchaudio==2.1.0+cu121 pytorch-cuda=12.1 -c pytorch -c nvidia diff --git a/杭州日电量/industry_elec_cws.py b/杭州日电量/industry_elec_cws.py index b722dd5..5a6411f 100644 --- a/杭州日电量/industry_elec_cws.py +++ b/杭州日电量/industry_elec_cws.py @@ -151,7 +151,7 @@ def to_data(file_dir, excel): if __name__ == '__main__': file_dir = r'./浙江所有地市133行业数据' - p = Pool(4) + p = Pool(6) for excel in os.listdir((file_dir)): p.apply_async(func=to_data, args=(file_dir, excel)) p.close() diff --git a/杭州日电量/pip3正确安装PyTorch GPU版本.txt b/杭州日电量/pip3正确安装PyTorch GPU版本.txt deleted file mode 100644 index e10657d..0000000 --- a/杭州日电量/pip3正确安装PyTorch GPU版本.txt +++ /dev/null @@ -1,11 +0,0 @@ -# 首先卸载 -pip3 uninstall torch -pip3 uninstall torchvision -pip3 uninstall torchaudio - -# 然后安装 -pip3 install torch==2.1.0+cu121 torchvision==0.16.0+cu121 torchaudio==2.1.0+cu121 -f https://download.pytorch.org/whl/cu121/torch_stable.html - - -# 可临时清华源加速 -pip3 install torch==2.1.0+cu121 torchvision==0.16.0+cu121 torchaudio==2.1.0+cu121 -f https://download.pytorch.org/whl/cu121/torch_stable.html -i https://pypi.tuna.tsinghua.edu.cn/simple/ \ No newline at end of file