我参照了这个DCGAN-tensorflow项目,运行了其中的mnist数据集生成程序,奈何我是24K纯小白,运行过程中有几个问题。
1、数据集可以自己先下载,放到工程下的文件夹中。先是训练模型,程序需要改的参数有,
flags.DEFINE_integer("input_height", 28, "The size of image to use (will be center cropped). [108]")#输入数据参数,不是默认值108. flags.DEFINE_integer("input_width", None, "The size of image to use (will be center cropped). If None, same value as input_height [None]")
flags.DEFINE_boolean("train", True, "True for training, False for testing [False]")#执行训练过程,需要把train的值改为ture flags.DEFINE_boolean("crop", True, "True for training, False for testing [False]")
flags.DEFINE_string("out_name", "", "Folder (under out_root_dir) for all outputs. Generated automatically if left blank []")#执行测试过程需要把训练生成的文件夹名字填上,不然每次测试都会生成新的没有训练模型的文件夹。把"",填上训练生成文件夹的名字。