-
Notifications
You must be signed in to change notification settings - Fork 151
PrettyTensor's template.construct() yielding ValueError #56
Comments
Same issue in running Shakespeare.py with Tensorflow 1.2.1 and Python 3.5.2 |
This is the output from shakespeare.py, @eiderman ? python shakespeare.py |
For almost any call to a template's construct() method, I get
ValueError: too many values to unpack
When I run the template test file from https://github.com/google/prettytensor/blob/master/prettytensor/templated_pretty_tensor_test.py, 14 tests fail with this error. For example:
======================================================================
ERROR: testAttach (main.TemplatedPrettyTensorTest)
Traceback (most recent call last):
File "unit_test.py", line 81, in testAttach
out = self.RunTensor(input_pt.attach_template(template, 'input'))
File "/opt/conda/lib/python2.7/site-packages/prettytensor/pretty_tensor_class.py", line 750, in attach_template
return _template.as_layer().construct(**unbound_var_values)
File "/opt/conda/lib/python2.7/site-packages/prettytensor/pretty_tensor_class.py", line 1248, in construct
return self._construct(context)
File "/opt/conda/lib/python2.7/site-packages/prettytensor/pretty_tensor_class.py", line 1173, in _construct
method_args = self._replace_deferred(self._method_args, context)
File "/opt/conda/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 "/opt/conda/lib/python2.7/site-packages/prettytensor/pretty_tensor_class.py", line 1140, in _replace_deferred
return arg._construct(context)
File "/opt/conda/lib/python2.7/site-packages/prettytensor/pretty_tensor_class.py", line 1173, in _construct
method_args = self._replace_deferred(self._method_args, context)
File "/opt/conda/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 "/opt/conda/lib/python2.7/site-packages/prettytensor/pretty_tensor_class.py", line 1140, in _replace_deferred
return arg._construct(context)
File "/opt/conda/lib/python2.7/site-packages/prettytensor/pretty_tensor_class.py", line 1176, in _construct
_strip_unnecessary_contents_from_stack(result, set())
File "/opt/conda/lib/python2.7/site-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
As a simpler example, the code from here does the same thing.
I'm using Tensorflow 1.2.0 and Python 2.7.1.
I've tried
pip uninstall prettytensor
pip install prettytensor
pip install prettytensor --upgrade
but the problem persists.
Context: I'm trying to use hanzhanggit's StackGAN implementation. I haven't worked with TensorFlow before.
I believe this is related to issue 53.
The text was updated successfully, but these errors were encountered: