AttGAN-Cartoon-Tensorflow
AttGAN-Cartoon-Tensorflow copied to clipboard
Train fail
Hello, Have you face the same problem below?
File "train.py", line 306, in images
should be in the range of %s!' % (l + ',' + r)
AssertionError: images
should be in the range of [-1.0,1.0]!
It's my download data problem?
@GilbertTam What modification did you made?
I just run train ,no parameters change when epoch is 15 will fail
@GilbertTam Do the images in the output folder make sense? I just rerun the code but haven't got any error.
hi,i have the same problem,no parameters change. run in cpu mode,It's problem?
python 3.6.9 tensorflow-gpu 1.15.0 cuda 10.2 cudnn 7.6
error output:
Inner Epoch Loop: 40%|█████████████████████████████████████████████████████████| 99/250 [06:59<10:40, 4.24s/it]
Epoch Loop: 3%|████ | 14/500 [4:09:19<144:15:05, 1068.53s/it]
Traceback (most recent call last):
File "train.py", line 306, in <module>
sample(ep, it)
File "train.py", line 251, in run
im.imwrite(sample, '%s/Epoch-%d_Iter-%d.jpg' % (save_dir, epoch, iter))
File "/home/git_prj/AttGAN-Cartoon-Tensorflow/imlib/basic.py", line 23, in imwrite
iio.imsave(path, dtype.im2uint(image), quality=quality, **plugin_args)
File "/home/git_prj/AttGAN-Cartoon-Tensorflow/imlib/dtype.py", line 51, in im2uint
return to_range(images, 0, 255, np.uint8)
File "/home/git_prj/AttGAN-Cartoon-Tensorflow/imlib/dtype.py", line 32, in to_range
_check(images, [np.float32, np.float64], -1.0, 1.0)
File "/home/git_prj/AttGAN-Cartoon-Tensorflow/imlib/dtype.py", line 27, in _check
'`images` should be in the range of %s!' % (l + ',' + r)
AssertionError: `images` should be in the range of [-1.0,1.0]!
On this issue,I changed it here ,Then it run.
# File "train.py"
# run(epoch, iter)
try:
im.imwrite(sample, '%s/Epoch-%d_Iter-%d.jpg' %
(save_dir, epoch, iter))
except:
print('ERROR: Could not save %s/Epoch-%d_Iter-%d.jpg' %
(save_dir, epoch, iter))
@millionsofluo I am still confused by this problem. Is there any good results in the output
folder.
@LynnHo Yes,This folder has good results,Very strange.
Epoch-11_Iter-249.jpg Epoch-2_Iter-99.jpg Epoch-9_Iter-149.jpg
Epoch-19_Iter-49.jpg Epoch-4_Iter-199.jpg
Epoch-21_Iter-149.jpg Epoch-7_Iter-49.jpg