1、相关地址
代码地址:https://github.com/Sohl-Dickstein/Diffusion-Probabilistic-Models
论文地址:https://arxiv.org/abs/2006.11239
2、python2.7 环境安装
conda create -n theano python=2.7 -y
conda activate theano
3、包安装
下载合适的版本,也就是2015年的版本
fule地址:https://github.com/mila-iqia/fuel/tree/2ef42d36e5e772742ef36cade4932e0b00ea2c76
Blocks地址:https://github.com/mila-iqia/blocks/tree/d7d8b6200cd32d4922d27d76aeff3958f465e222
Theano地址:https://github.com/Theano/Theano/tree/7e34c538188bdd4d9fd8a7cabe1496042a68587c
下载完成后进入包里面,完成安装
cd package
python setup.py install
其他包安装:
pip install numpy==1.9.3
pip install picklable-itertools==0.1.1
pip install progressbar2==2.7.3
pip install pyyaml==3.11
pip install six==1.9.0
pip install toolz==0.7.2
pip install pillow
pip install requests
使用下列代码安装tables时报错
pip install tables
解决办法:
conda install pytables
3、准备数据集
过程介绍连接:https://github.com/mila-udem/fuel/blob/master/docs/built_in_datasets.rst
3.1、新建一个数据集文件夹,并且进入下载数据
mkdir dataset
cd dataset
fuel-download mnist
之后,文件夹下会出现4个数据集
不过这样生成的数据集在转化时会报错,因此选择直接下载。下载连接如下所是
链接: https://pan.baidu.com/s/1h2quu_1B8nXvg4XQwgt6oA?pwd=mnis
提取码: mnis
3.2、转化数据集
fuel-convert mnist
文件夹下会出现mnist.hdf5
3.3、可以查看mnist.hdf5并且删除不需要的文件
fuel-info mnist.hdf5
fuel-download mnist --clear
4、修改fuel文家中data_path为3.1节中包含数据mnist.hdf5的路径
运行下列代码或者直接在pycharm中开始训练。
python train.py