sigmoid_cross_entropy_with_logits does not have `labels` arg
See original GitHub issueHello,
I’m having some difficulties getting the example code to execute. I believe the issue stems from a tensorflow versioning delta. I first tried to train a model on the celebA data after setting up a cpu tensorflow docker container from: https://hub.docker.com/r/tensorflow/tensorflow/
When I run
python main.py --dataset celebA --input_height=108 --is_train --is_crop True
I get the following traceback:
Traceback (most recent call last):
File "main.py", line 96, in <module>
tf.app.run()
File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/platform/app.py", line 43, in run
sys.exit(main(sys.argv[:1] + flags_passthrough))
File "main.py", line 76, in main
sample_dir=FLAGS.sample_dir)
File "/root/git_repos/DCGAN-tensorflow/model.py", line 71, in __init__
self.build_model()
File "/root/git_repos/DCGAN-tensorflow/model.py", line 115, in build_model
logits=self.D_logits, labels=tf.ones_like(self.D)))
TypeError: sigmoid_cross_entropy_with_logits() got an unexpected keyword argument 'labels'
After looking, I found sigmoid_cross_entropy_with_logits here: https://github.com/tensorflow/tensorflow/blob/cb17d1b0e2b581b5da1d9597b7929ba764749d38/tensorflow/python/ops/nn_impl.py#L99
which shows that it does take a labels
arg. However, the version under v0.12.1 does not take this arg which I believe is the error I’m receiving above.
Furthermore, if I try to install the specific version of tensorflow branch that you linked to:
pip install git+https://github.com/tensorflow/tensorflow.git@r0.12
I get the following traceback:
Collecting git+https://github.com/tensorflow/tensorflow.git@r0.12
Cloning https://github.com/tensorflow/tensorflow.git (to r0.12) to /tmp/pip-oKC0L1-build
Complete output from command python setup.py egg_info:
Traceback (most recent call last):
File "<string>", line 1, in <module>
IOError: [Errno 2] No such file or directory: '/tmp/pip-oKC0L1-build/setup.py'
----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-oKC0L1-build/
Any suggestions on how to get this up and running?
Thanks, Scott
Issue Analytics
- State:
- Created 7 years ago
- Comments:13 (1 by maintainers)
Top GitHub Comments
You can use any links in https://github.com/tensorflow/tensorflow#installation like:
Yes the argument only exist in new version of TensorFlow.
Your command is not the right way to install TensorFlow. Please refer to the documentation: https://github.com/tensorflow/tensorflow#installation . (For this new feature you may need the nightly build)