commaai / research

dataset and code for 2016 paper "Learning a Driving Simulator"
BSD 3-Clause "New" or "Revised" License
4.12k stars 1.17k forks source link

GAN+VAE: error when assigning value when training #46

Closed sbaurdlp closed 7 years ago

sbaurdlp commented 7 years ago

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:

      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:

Thank in advance !

sbaurdlp commented 7 years ago

Well I found this, I suppose it solve the problem