carpedm20 / carpedm20/DCGAN-tensorflow
InvalidArgumentError: You must feed a value for placeholder tensor 'real_images' with dtype float and shape
- Dominant language
- JavaScript
- Stars
- 7.2k
- Forks
- 2.6k
- PR merge metrics
- No merged PRs in 30d
Description
After i run your code, there are such error news: You must feed a value for placeholder tensor 'real_images' with dtype float and shape. The 'placegholder' in this error news is the self.input, i define this placeholder as following:
self.inputs=tf.placeholder(tf.float32,[self.batch_size]+image_dims,name='real_images')
In fact, i have feed the placeholder values as follows :
_, summary_str = self.sess.run([d_optim, self.d_sum],
feed_dict={ self.inputs: batch_images,
self.z: batch_z })
self.writer.add_summary(summary_str, counter)
# Update G network
_, summary_str = self.sess.run([g_optim, self.g_sum],
feed_dict={ self.z: batch_z })
self.writer.add_summary(summary_str, counter)
# Run g_optim twice to make sure that d_loss does not go to zero (different from paper)
_, summary_str = self.sess.run([g_optim, self.g_sum],
feed_dict={ self.z: batch_z })
self.writer.add_summary(summary_str, counter)
errD_fake = self.d_loss_fake.eval({ self.z: batch_z })
errD_real = self.d_loss_real.eval({ self.inputs: batch_images })
errG = self.g_loss.eval({self.z: batch_z})
Could you can help find the problem? Thanks!
Contributor guide
No contributing guide indexed for this repository
Research direction
Start at the self.inputs placeholder definition and inspect each sess.run or eval call shown in the report, especially fetches that may depend on real_images. Reproduce the error with the displayed feed_dict calls and verify that every operation requiring real_images receives batch_images before considering the issue resolved.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- tensorflow
- Domain
- machine-learning
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100