hanzhanggit / StackGAN

MIT License
1.86k stars 457 forks source link

"Too many values to unpack" (stageI training) #27

Closed kyle-pena-nlp closed 7 years ago

kyle-pena-nlp commented 7 years ago

Ubuntu 16.04 Python 2.7 Tensorflow 0.12.0 Two GE Force GTX 1080 TI Core I7 64 GB RAM

When running stageI training with GPU enabled:

python stageI/run_exp.py --cfg stageI/cfg/birds.yml --gpu 1

Stack Trace

Free memory: 10.75GiB 2017-10-17 21:02:08.926351: I tensorflow/core/common_runtime/gpu/gpu_device.cc:961] DMA: 0 1 2017-10-17 21:02:08.926360: I tensorflow/core/common_runtime/gpu/gpu_device.cc:971] 0: Y Y 2017-10-17 21:02:08.926363: I tensorflow/core/common_runtime/gpu/gpu_device.cc:971] 1: Y Y 2017-10-17 21:02:08.926374: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1030] Creating TensorFlow device (/gpu:0) -> (device: 0, name: GeForce GTX 1080 Ti, pci bus id: 0000:01:00.0) 2017-10-17 21:02:08.926379: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1030] Creating TensorFlow device (/gpu:1) -> (device: 1, name: GeForce GTX 1080 Ti, pci bus id: 0000:02:00.0) Traceback (most recent call last): File "stageI/run_exp.py", line 68, in algo.train() File "/home/kyle/git/StackGAN/stageI/trainer.py", line 306, in train counter = self.build_model(sess) File "/home/kyle/git/StackGAN/stageI/trainer.py", line 280, in build_model self.init_opt() File "/home/kyle/git/StackGAN/stageI/trainer.py", line 108, in init_opt self.embeddings) File "/home/kyle/git/StackGAN/stageI/trainer.py", line 134, in compute_losses real_logit = self.model.get_discriminator(images, embeddings) File "/home/kyle/git/StackGAN/stageI/model.py", line 217, in get_discriminator x_code = self.d_encode_img_template.construct(input=x_var) File "/home/kyle/git/StackGAN/.env/local/lib/python2.7/site-packages/prettytensor/pretty_tensor_class.py", line 1248, in construct return self._construct(context) File "/home/kyle/git/StackGAN/.env/local/lib/python2.7/site-packages/prettytensor/pretty_tensor_class.py", line 1173, in _construct method_args = self._replace_deferred(self._method_args, context) File "/home/kyle/git/StackGAN/.env/local/lib/python2.7/site-packages/prettytensor/pretty_tensor_class.py", line 1145, in _replace_deferred return [self._replace_deferred(x, context) for x in arg] File "/home/kyle/git/StackGAN/.env/local/lib/python2.7/site-packages/prettytensor/pretty_tensor_class.py", line 1140, in _replace_deferred return arg._construct(context) File "/home/kyle/git/StackGAN/.env/local/lib/python2.7/site-packages/prettytensor/pretty_tensor_class.py", line 1173, in _construct method_args = self._replace_deferred(self._method_args, context) File "/home/kyle/git/StackGAN/.env/local/lib/python2.7/site-packages/prettytensor/pretty_tensor_class.py", line 1145, in _replace_deferred return [self._replace_deferred(x, context) for x in arg] File "/home/kyle/git/StackGAN/.env/local/lib/python2.7/site-packages/prettytensor/pretty_tensor_class.py", line 1140, in _replace_deferred return arg._construct(context) File "/home/kyle/git/StackGAN/.env/local/lib/python2.7/site-packages/prettytensor/pretty_tensor_class.py", line 1173, in _construct method_args = self._replace_deferred(self._method_args, context) File "/home/kyle/git/StackGAN/.env/local/lib/python2.7/site-packages/prettytensor/pretty_tensor_class.py", line 1145, in _replace_deferred return [self._replace_deferred(x, context) for x in arg] File "/home/kyle/git/StackGAN/.env/local/lib/python2.7/site-packages/prettytensor/pretty_tensor_class.py", line 1140, in _replace_deferred return arg._construct(context) File "/home/kyle/git/StackGAN/.env/local/lib/python2.7/site-packages/prettytensor/pretty_tensor_class.py", line 1173, in _construct method_args = self._replace_deferred(self._method_args, context) File "/home/kyle/git/StackGAN/.env/local/lib/python2.7/site-packages/prettytensor/pretty_tensor_class.py", line 1145, in _replace_deferred return [self._replace_deferred(x, context) for x in arg] File "/home/kyle/git/StackGAN/.env/local/lib/python2.7/site-packages/prettytensor/pretty_tensor_class.py", line 1140, in _replace_deferred return arg._construct(context) File "/home/kyle/git/StackGAN/.env/local/lib/python2.7/site-packages/prettytensor/pretty_tensor_class.py", line 1173, in _construct method_args = self._replace_deferred(self._method_args, context) File "/home/kyle/git/StackGAN/.env/local/lib/python2.7/site-packages/prettytensor/pretty_tensor_class.py", line 1145, in _replace_deferred return [self._replace_deferred(x, context) for x in arg] File "/home/kyle/git/StackGAN/.env/local/lib/python2.7/site-packages/prettytensor/pretty_tensor_class.py", line 1140, in _replace_deferred return arg._construct(context) File "/home/kyle/git/StackGAN/.env/local/lib/python2.7/site-packages/prettytensor/pretty_tensor_class.py", line 1173, in _construct method_args = self._replace_deferred(self._method_args, context) File "/home/kyle/git/StackGAN/.env/local/lib/python2.7/site-packages/prettytensor/pretty_tensor_class.py", line 1145, in _replace_deferred return [self._replace_deferred(x, context) for x in arg] File "/home/kyle/git/StackGAN/.env/local/lib/python2.7/site-packages/prettytensor/pretty_tensor_class.py", line 1140, in _replace_deferred return arg._construct(context) File "/home/kyle/git/StackGAN/.env/local/lib/python2.7/site-packages/prettytensor/pretty_tensor_class.py", line 1173, in _construct method_args = self._replace_deferred(self._method_args, context) File "/home/kyle/git/StackGAN/.env/local/lib/python2.7/site-packages/prettytensor/pretty_tensor_class.py", line 1145, in _replace_deferred return [self._replace_deferred(x, context) for x in arg] File "/home/kyle/git/StackGAN/.env/local/lib/python2.7/site-packages/prettytensor/pretty_tensor_class.py", line 1140, in _replace_deferred return arg._construct(context) File "/home/kyle/git/StackGAN/.env/local/lib/python2.7/site-packages/prettytensor/pretty_tensor_class.py", line 1173, in _construct method_args = self._replace_deferred(self._method_args, context) File "/home/kyle/git/StackGAN/.env/local/lib/python2.7/site-packages/prettytensor/pretty_tensor_class.py", line 1145, in _replace_deferred return [self._replace_deferred(x, context) for x in arg] File "/home/kyle/git/StackGAN/.env/local/lib/python2.7/site-packages/prettytensor/pretty_tensor_class.py", line 1140, in _replace_deferred return arg._construct(context) File "/home/kyle/git/StackGAN/.env/local/lib/python2.7/site-packages/prettytensor/pretty_tensor_class.py", line 1173, in _construct method_args = self._replace_deferred(self._method_args, context) File "/home/kyle/git/StackGAN/.env/local/lib/python2.7/site-packages/prettytensor/pretty_tensor_class.py", line 1145, in _replace_deferred return [self._replace_deferred(x, context) for x in arg] File "/home/kyle/git/StackGAN/.env/local/lib/python2.7/site-packages/prettytensor/pretty_tensor_class.py", line 1140, in _replace_deferred return arg._construct(context) File "/home/kyle/git/StackGAN/.env/local/lib/python2.7/site-packages/prettytensor/pretty_tensor_class.py", line 1173, in _construct method_args = self._replace_deferred(self._method_args, context) File "/home/kyle/git/StackGAN/.env/local/lib/python2.7/site-packages/prettytensor/pretty_tensor_class.py", line 1145, in _replace_deferred return [self._replace_deferred(x, context) for x in arg] File "/home/kyle/git/StackGAN/.env/local/lib/python2.7/site-packages/prettytensor/pretty_tensor_class.py", line 1140, in _replace_deferred return arg._construct(context) File "/home/kyle/git/StackGAN/.env/local/lib/python2.7/site-packages/prettytensor/pretty_tensor_class.py", line 1173, in _construct method_args = self._replace_deferred(self._method_args, context) File "/home/kyle/git/StackGAN/.env/local/lib/python2.7/site-packages/prettytensor/pretty_tensor_class.py", line 1145, in _replace_deferred return [self._replace_deferred(x, context) for x in arg] File "/home/kyle/git/StackGAN/.env/local/lib/python2.7/site-packages/prettytensor/pretty_tensor_class.py", line 1140, in _replace_deferred return arg._construct(context) File "/home/kyle/git/StackGAN/.env/local/lib/python2.7/site-packages/prettytensor/pretty_tensor_class.py", line 1176, in _construct _strip_unnecessary_contents_from_stack(result, set()) File "/home/kyle/git/StackGAN/.env/local/lib/python2.7/site-packages/prettytensor/pretty_tensor_class.py", line 1335, in _strip_unnecessary_contents_from_stack for f, lineno, method, in result._traceback: ValueError: too many values to unpack

========================== Contents of my Requirements.txt

The following requirements were added by pip freeze:

backports.weakref==1.0.post1 bleach==1.5.0 easydict==1.7 enum34==1.1.6 funcsigs==1.0.2 html5lib==0.9999999 Markdown==2.6.9 mock==2.0.0 numpy==1.13.3 pandas==0.20.3 pbr==3.1.1 pkg-resources==0.0.0 prettytensor==0.7.4 progressbar==2.3 protobuf==3.4.0 python-dateutil==2.6.1 pytz==2017.2 six==1.11.0 tensorflow-gpu==1.3.0 tensorflow-tensorboard==0.1.8 torchfile==0.1.0 Werkzeug==0.12.2

The following requirements were added by pip freeze:

backports.weakref==1.0.post1 bleach==1.5.0 easydict==1.7 enum34==1.1.6 funcsigs==1.0.2 html5lib==0.9999999 Markdown==2.6.9 mock==2.0.0 numpy==1.13.3 pandas==0.20.3 pbr==3.1.1 pkg-resources==0.0.0 prettytensor==0.7.4 progressbar==2.3 protobuf==3.4.0 python-dateutil==2.6.1 pytz==2017.2 six==1.11.0 tensorflow-gpu==1.3.0 tensorflow-tensorboard==0.1.8 torchfile==0.1.0 Werkzeug==0.12.2

The following requirements were added by pip freeze:

scikit-learn==0.19.0

The following requirements were added by pip freeze:

backports.weakref==1.0rc1 bleach==1.5.0 easydict==1.7 enum34==1.1.6 funcsigs==1.0.2 html5lib==0.9999999 Markdown==2.2.0 mock==2.0.0 numpy==1.13.3 pandas==0.20.3 pbr==3.1.1 pkg-resources==0.0.0 prettytensor==0.7.4 progressbar==2.3 protobuf==3.4.0 python-dateutil==2.6.1 pytz==2017.2 six==1.11.0 tensorflow-gpu==1.2.0 tensorflow-tensorboard==0.1.8 torchfile==0.1.0 Werkzeug==0.12.2 scikit-learn==0.19.0

The following requirements were added by pip freeze:

backports.functools-lru-cache==1.4 cycler==0.10.0 decorator==4.1.2 matplotlib==2.1.0 networkx==2.0 olefile==0.44 Pillow==4.3.0 pyparsing==2.2.0 PyWavelets==0.5.2 PyYAML==3.12 scikit-image==0.13.1 scipy==0.19.1 subprocess32==3.2.7

cw1091293482 commented 7 years ago

Oh, I also have this problem, How to solve it?

cw1091293482 commented 7 years ago

Really thanks, I want it can work, but I try it again, and failed. Now I think it is version issue, I mean, the version of prettytensor, probably, and my running tesnorflow version is R1.3, not as yours R0.12, the original code is based on R0.12, so if transfer it to higher version, there exists problem, e.g. the usage of concat(), but now I have modified the augment order of concat(), but the current issue of mine is caused by prettytensor template.construct(), see https://github.com/google/prettytensor/blob/master/docs/pretty_tensor_top_level.md unfortunately, it cannot solve my facing confusing problem.

cw1091293482 commented 7 years ago

Hey, thank you, before I re-run the code, I check the version of mine, but the pandas of mine is 0.20.0, as you said, it should be upgraded to 0.20.0, where i can get the 0.20.3? I try this: pip uninstall pandas pip install pandas pip install pandas --upgrade but version is still 0.20.0. so how to update this dependency package?

shuizhilinxin commented 6 years ago

so,How to solve this problem,?

VivekWisdom commented 6 years ago

@kyle-pena-nlp Any solution to this issue?

kyle-pena-nlp commented 6 years ago

@vivekwisdom - My solution involved making manual changes to both the source code of this project as well as a few of its dependencies (I literally opened the python code in the installed packages and changed it). This is a horrible way to go about making it work, but my interest at the time was simply getting it to run. What I did wasn't really a solution. What's needed is for the repository contributors to publish the exact versions of each of their dependencies that they used.