DCGAN-tensorflow
DCGAN-tensorflow copied to clipboard
absl.flags._exceptions.IllegalFlagValueError: flag --train_size=inf: Expect argument to be a string or int, found <type 'float'>
when I use datasets except mnist, it always has this error. I really don't know what is wrong with the codes.
It also happens to me. I'm trying to use the celebA dataset which I downloaded with:
python download.py mnist celebA
But as soon as I try:
python main.py --dataset celebA --input_height=108 --crop
I get this error:
absl.flags._exceptions.IllegalFlagValueError: flag --train_size=inf: Expect argument to be a string or int, found <type 'float'>
I'm using Python35.
Does anyone have any idea?
Hey, I think I fixed this by changing this line in main.py from:
flags.DEFINE_integer("train_size", np.inf, "The size of train images [np.inf]")
to:
flags.DEFINE_float("train_size", np.inf, "The size of train images [np.inf]")
It doesn't give me errors anymore and I'm able to train with the celebA dataset.
I'm using tensorflow-gpu 1.5.0 (last version), CUDA Toolkit 9.0, and cuDNN v7.
flags.DEFINE_integer("train_size", np.inf, "The size of train images [np.inf]") to: flags.DEFINE_float("train_size", np.inf, "The size of train images [np.inf]")
it works!!!
Thanks for HyruleExplorer's method. It works fine!
in train-dcgan.py
flags.DEFINE_integer("train_size", np.inf, "The size of train images [np.inf]") to: flags.DEFINE_float("train_size", np.inf, "The size of train images [np.inf]")
It works!