本帖最后由 Legend 于 2024-11-30 19:25 编辑
怎么在自己的电脑上完成训练过程?
电脑配置需求
模型很小,可以不用用显卡
windows 10 以上是必须的,内存大于8G即可,cpu越快越好。
C盘空间10G
下载项目源码
https://www.stcaimcu.com/forum.php?mod=viewthread&tid=11901
准备python环境
推荐使用 Miniconda 管理python虚拟环境,这样切换 python 版本会非常方便
https://mirrors.tuna.tsinghua.ed ... -Windows-x86_64.exe
切换到国内镜像
避免从默认的国外服务器下载软件包
- pip config set global.index-url https://mirrors.ustc.edu.cn/pypi/simple
-
- conda config --set show_channel_urls yes
- conda clean -i
- notepad %USERPROFILE%\.condarc
复制代码
编辑 `%USERPROFILE%\.condarc` 输入以下内容
- channels:
- - defaults
- show_channel_urls: true
- default_channels:
- - https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main
- - https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/r
- - https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/msys2
- custom_channels:
- conda-forge: https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud
- pytorch: https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud
复制代码
创建python虚拟环境
创建一个python虚拟环境,激活新创建的虚拟环境,安装依赖
conda create --name ai8051u python=3.9
conda activate ai8051u
pip install -r requirements.txt
配置vscode
安装 python c/c++ jupyter 插件
|