ValueError on train with celebA
See original GitHub issueI’m getting an error during training. I tried it both with a version of celebA I already had on hand and with the one output by download.py and I got the same error. I’m running the system with --use_gpu=False (in case that matters).
Thanks for your help!
Here’s the output and stack trace:
`[*] MODEL dir: logs/celebA_0418_104602 [*] PARAM path: logs/celebA_0418_104602/params.json 0%| | 0/500000 [00:00<?, ?it/s][0/500000] Loss_D: 0.538686 Loss_G: 0.048095 measure: 0.7599, k_t: 0.0002 [*] Samples saved: logs/celebA_0418_104602/0_G.png
Traceback (most recent call last): File “main.py”, line 43, in <module> main(config) File “main.py”, line 35, in main trainer.train() File “/home/mvertolli/BEGAN/trainer.py”, line 158, in train self.autoencode(x_fixed, self.model_dir, idx=step, x_fake=x_fake) File “/home/mvertolli/BEGAN/trainer.py”, line 263, in autoencode x = self.sess.run(self.AE_x, {self.x: img}) File “/home/mvertolli/virtualenvs/tensorflow/local/lib/python2.7/site-packages/tensorflow/python/client/session.py”, line 778, in run run_metadata_ptr) File “/home/mvertolli/virtualenvs/tensorflow/local/lib/python2.7/site-packages/tensorflow/python/client/session.py”, line 961, in _run % (np_val.shape, subfeed_t.name, str(subfeed_t.get_shape()))) ValueError: Cannot feed value of shape (16, 3, 64, 64) for Tensor u’ToFloat:0’, which has shape ‘(16, 64, 64, 3)’`
Issue Analytics
- State:
- Created 6 years ago
- Comments:7 (1 by maintainers)
Top GitHub Comments
@mrjel It’s because of the performance. ‘NCHW’ is cuDNN default which can make the GPU calculation faster. Details can be found https://www.tensorflow.org/performance/performance_guide#use_nchw_image_data_format
@MichaelOVertolli I didn’t tested for
--use_gpu=False
and that’s why the error causes. I can fix that problem but I can pretty sure that you can’t achieve whatever you want without gpu. You need GPU to train BEGAN in reasonable timeline (in hours or 1~2 days) or you’ll need to wait weeks unless you’re not training small dataset like MNIST. CelebA won’t be trained without GPU in reasonable time.@carpedm20 thanks