layerwise/AAE-tensorflow

ValueError: too many values to unpack

Opened this issue · 5 comments

Good Morning Everyone,

I am trying to run python main.py --aae
I get the following error:

Traceback (most recent call last):
  File "main.py", line 104, in <module>
    model = AAE(**MNIST_AAE_HYPERPARAMS)
  File "/home/ubuntu/AAE-tensorflow/aae/adversarial_autoencoder.py", line 166, in __init__
    self._build_graph()
  File "/home/ubuntu/AAE-tensorflow/aae/adversarial_autoencoder.py", line 323, in _build_graph
    self.h_encoded = self.encoder_template.construct(x_in=self.x_in).tensor
  File "/home/ubuntu/miniconda3/envs/AAE-tensorflow/lib/python2.7/site-packages/prettytensor/pretty_tensor_class.py", line 1288, in construct
    return self._construct(context)
  File "/home/ubuntu/miniconda3/envs/AAE-tensorflow/lib/python2.7/site-packages/prettytensor/pretty_tensor_class.py", line 1213, in _construct
[...]
  File "/home/ubuntu/miniconda3/envs/AAE-tensorflow/lib/python2.7/site-packages/prettytensor/pretty_tensor_class.py", line 1375, in _strip_unnecessary_contents_from_stack
    for f, line_no, method, _ in result._traceback:
ValueError: too many values to unpack

I have installed prerequisite packages, and prettytensor has required version.
Do anybody face the same issue?
Thanks in advance,
Sincerely,

Pierre

Hello,

try the requirements mentioned in the new branch I created (tensorflow 1.4 and prettytensor 0.7.4) and see if the error persists. Seems to run, but I haven't tested it extensively. Let me know if that doesn't help.

Best,
Mathias

Good Evening Mathias,

It still does not work for me but never mind, I tried my best to use another repository to implement a convolutional AAE.
My autoencoder works quite well alone, yet it is extremely difficult for me to manage the adversarial part.
Usually, either my generator or my discriminative part learns more difficultly than the other.
I know those are commont GAN issues, but I was wondering if you had advice or reference to fix my issues (I tried to find your mail but do not find it, so I take the liberty to write this to you here :) )
Thanks for your help!
Sincerely,

Pierre

Dear Pierre,

interesting you should struggle with that, because I did as well. I managed to get it to work after some strenuous parameter search, deviating somewhat from the details mentioned in the paper, most notably shifting from a fully connected network to a convolutional one even for MNIST. But no special insights except what you already observed: could be one of the challenges generally encountered with GANs. Maybe some of the known improvements could be applicable here? A lot has happened with GANs in the meantime, I think. Best of luck to you!

Cheers,
Mathias

I encountered the same problem. I checked the version of prettytensor as 0.7.4 and tensorflow as 1.4.1.
The problem still happens in prettytensor.

Traceback (most recent call last):
  File "main.py", line 106, in <module>
    model = AAE(**MNIST_VAE_HYPERPARAMS)
  File "/home/ ... /AAE-tensorflow/aae/adversarial_autoencoder.py", line 166, in __init__
    self._build_graph()
  File "/home/ ...  /AAE-tensorflow/aae/adversarial_autoencoder.py", line 323, in _build_graph
    self.h_encoded = self.encoder_template.construct(x_in=self.x_in).tensor
  File "/usr/local/lib/python2.7/dist-packages/prettytensor/pretty_tensor_class.py", line 1248, in construct
    return self._construct(context)
  File "/usr/local/lib/python2.7/dist-packages/prettytensor/pretty_tensor_class.py", line 1173, in _construct
    method_args = self._replace_deferred(self._method_args, context)
  File "/usr/local/lib/python2.7/dist-packages/prettytensor/pretty_tensor_class.py", line 1145, in _replace_deferred
    return [self._replace_deferred(x, context) for x in arg]
  File "/usr/local/lib/python2.7/dist-packages/prettytensor/pretty_tensor_class.py", line 1140, in _replace_deferred
    return arg._construct(context)
  File "/usr/local/lib/python2.7/dist-packages/prettytensor/pretty_tensor_class.py", line 1173, in _construct
    method_args = self._replace_deferred(self._method_args, context)
  File "/usr/local/lib/python2.7/dist-packages/prettytensor/pretty_tensor_class.py", line 1145, in _replace_deferred
    return [self._replace_deferred(x, context) for x in arg]
  File "/usr/local/lib/python2.7/dist-packages/prettytensor/pretty_tensor_class.py", line 1140, in _replace_deferred
    return arg._construct(context)
  File "/usr/local/lib/python2.7/dist-packages/prettytensor/pretty_tensor_class.py", line 1173, in _construct
    method_args = self._replace_deferred(self._method_args, context)
  File "/usr/local/lib/python2.7/dist-packages/prettytensor/pretty_tensor_class.py", line 1145, in _replace_deferred
    return [self._replace_deferred(x, context) for x in arg]
  File "/usr/local/lib/python2.7/dist-packages/prettytensor/pretty_tensor_class.py", line 1140, in _replace_deferred
    return arg._construct(context)
  File "/usr/local/lib/python2.7/dist-packages/prettytensor/pretty_tensor_class.py", line 1173, in _construct
    method_args = self._replace_deferred(self._method_args, context)
  File "/usr/local/lib/python2.7/dist-packages/prettytensor/pretty_tensor_class.py", line 1145, in _replace_deferred
    return [self._replace_deferred(x, context) for x in arg]
  File "/usr/local/lib/python2.7/dist-packages/prettytensor/pretty_tensor_class.py", line 1140, in _replace_deferred
    return arg._construct(context)
  File "/usr/local/lib/python2.7/dist-packages/prettytensor/pretty_tensor_class.py", line 1173, in _construct
    method_args = self._replace_deferred(self._method_args, context)
  File "/usr/local/lib/python2.7/dist-packages/prettytensor/pretty_tensor_class.py", line 1145, in _replace_deferred
    return [self._replace_deferred(x, context) for x in arg]
  File "/usr/local/lib/python2.7/dist-packages/prettytensor/pretty_tensor_class.py", line 1140, in _replace_deferred
    return arg._construct(context)
  File "/usr/local/lib/python2.7/dist-packages/prettytensor/pretty_tensor_class.py", line 1173, in _construct
    method_args = self._replace_deferred(self._method_args, context)
  File "/usr/local/lib/python2.7/dist-packages/prettytensor/pretty_tensor_class.py", line 1145, in _replace_deferred
    return [self._replace_deferred(x, context) for x in arg]
  File "/usr/local/lib/python2.7/dist-packages/prettytensor/pretty_tensor_class.py", line 1140, in _replace_deferred
    return arg._construct(context)
  File "/usr/local/lib/python2.7/dist-packages/prettytensor/pretty_tensor_class.py", line 1173, in _construct
    method_args = self._replace_deferred(self._method_args, context)
  File "/usr/local/lib/python2.7/dist-packages/prettytensor/pretty_tensor_class.py", line 1145, in _replace_deferred
    return [self._replace_deferred(x, context) for x in arg]
  File "/usr/local/lib/python2.7/dist-packages/prettytensor/pretty_tensor_class.py", line 1140, in _replace_deferred
    return arg._construct(context)
  File "/usr/local/lib/python2.7/dist-packages/prettytensor/pretty_tensor_class.py", line 1176, in _construct
    _strip_unnecessary_contents_from_stack(result, set())
  File "/usr/local/lib/python2.7/dist-packages/prettytensor/pretty_tensor_class.py", line 1335, in _strip_unnecessary_contents_from_stack
    for f, line_no, method, _ in result._traceback:
ValueError: too many values to unpack

this code seems to be unnecessarily complicated.