with tf.control_dependencies(outputs):
updates = [tf.assign(p, new_p) for (p, new_p) in D.updates]
I get the error:
updates = [tf.assign(p, new_p) for (p, new_p) in D.updates]
File "/local/gensoft2/exe/tensorflow/1.0.0-py2/lib/python2.7/site-packages/tensorflow/python/framework/ops.py", line 516, in __iter__
raise TypeError("'Tensor' object is not iterable.")
TypeError: 'Tensor' object is not iterable.`
Indeed, D.updates - where D is a keras.models.Model instance - is a list of tensors and not a list of tuples (keras 2.0.3).
So my questions are:
What these lines are supposed to do and how should it be corrected ?
Is there anything I'm missing ?
Should it just be replaced by:
with tf.control_dependencies(outputs):
updates = [tf.assign(p, new_p) for (p, new_p) in D.updates]
Hi,
first, thank you so much for your Autoencoding beyond pixels using a learned similarity metric code ! I adapted it to my needs, and I when I run it a get an error because of the lines 221-222:
I get the error:
Indeed,
D.updates
- whereD
is akeras.models.Model
instance - is a list of tensors and not a list of tuples (keras 2.0.3). So my questions are:Thank in advance !