这个仓库包含图片分类用到的一些工具和模型(CNN,ViT 和 DKL 模型).
- 要求:
- Python >= 3.10
- 按照官方文档安装 PyTorch.
- 安装 d2l:
- 克隆 d2l 仓库:
git clone https://github.com/d2l-ai/d2l-zh && cd d2l-zh
- 移除
setup.py
里对依赖项的版本要求. - 使用 pip 安装 d2l:
pip install .
- 克隆 d2l 仓库:
- 安装其他依赖项:
cd /path/to/ic/ && pip install -r requirements.txt
- 在 Python 脚本中添加仓库路径:
import sys sys.path.append('/path/to/ic/')
- 您即可导入此包:
import ic