Closed mnill closed 7 years ago
Thanks for the fixes. I do most of my work with python 2.7 and theano. Please let me know any issues you have on other platforms.
Keras backend is ugly for tensorflow updates. Theano updates you can unpack easily because it is just a tuple. TF updates have to be unpacked using update.op.inputs
.
Personally, wrapping updates in tf.assign should be pushed into function creation, but that isn't the keras design. A backend function that unpacks updates would be a good idea.
You really see this in the unrolled optimizer. Theano code to recursively unroll updates is much cleaner than tensorflow.
Cheers, Ben
Just looked up the answer: python2.7 items is a list and iteritems is a generator. python3 items is a view.
So, items will work in both 2 and 3 but a slight performance hit in 2.
Compatible answer that performs the best is six.iteritems
, which uses iteritems in python 2 and items in python 3.
Cheers, Ben
At first thanks for u work. There some small fixes.
Also, https://github.com/bstriner/keras_adversarial/blob/master/keras_adversarial/adversarial_utils.py#L127 not work with python3, but i do not known how to fix it right for both pythons.