Janus-Shiau/lookahead_tensorflow

TypeError: unsupported operand type(s) for +=: 'Operation' and 'list'

remifan opened this issue · 1 comments

error at train_op = train_op + lookahead.get_ops()

Tensorflow: 1.11.0
Python: 3.5.2

Hi @remi-nd,

I usually maintain the train_op as a list of operators.
In your case, I think simple using train_op = [train_op] + lookahead.get_ops() will be helpful.

FYI, a simple example of using lookahead.get_ops() and train_op can be found in the new commit.

Thank you!