18 Star 74 Fork 49

DeepSpark / DeepSparkHub

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
README.md 1.50 KB
一键复制 编辑 原始数据 按行查看 历史
majorli6 提交于 2023-11-01 10:26 . !267Update result of PyTorch Model: DDPM

DDPM (Denoising Diffusion Probabilistic Models)

Model description

Unofficial PyTorch implementation of Denoising Diffusion Probabilistic Models. This implementation follows the most of details in official TensorFlow implementation.

Step 1: Installation

pip3 install -U pip setuptools
pip3 install -r requirements.txt
pip3 install protobuf==3.20.3
yum install -y mesa-libGL 
pip3 install urllib3==1.26.6

Step 2: Preparing datasets

mkdir -p stats && cd stats

Download precalculated statistic for dataset:

cifar10.train.npz

the dataset structure sholud look like:

stats
└── cifar10.train.npz

Step 3: Training

cd ..

# 8 GPUs
export CUDA_VISIBLE_DEVICES=0,1,2,3,4,5,6,7

python3 main.py --train \
    --flagfile ./config/CIFAR10.txt \
    --parallel

# 1 GPU
export CUDA_VISIBLE_DEVICES=0

python3 main.py --train \
    --flagfile ./config/CIFAR10.txt

Step 4: Evaluate

# 8 GPUs
export CUDA_VISIBLE_DEVICES=0,1,2,3,4,5,6,7

python3 main.py \
    --flagfile ./logs/DDPM_CIFAR10_EPS/flagfile.txt \
    --notrain \
    --eval \
    --parallel

# 1 GPU
export CUDA_VISIBLE_DEVICES=0

python3 main.py \
    --flagfile ./logs/DDPM_CIFAR10_EPS/flagfile.txt \
    --notrain \
    --eval

Results

GPUs FPS
BI-V100 x8 1.65 it/s

image

Reference

Python
1
https://gitee.com/deep-spark/deepsparkhub.git
git@gitee.com:deep-spark/deepsparkhub.git
deep-spark
deepsparkhub
DeepSparkHub
master

搜索帮助