duvenaud / relax

Optimizing control variates for black-box gradient estimation

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

gradvars issue

JiahaoYao opened this issue · comments

Hi, can anyone help me? It got the following issue?

Traceback (most recent call last):
  File "mnist_vae.py", line 100, in <module>
    gradvars = inf_gradvars + gen_gradvars + rebar_optimizer.variance_gradvars
TypeError: unsupported operand type(s) for +: 'zip' and 'list'

As a quick fix, you can try surrounding each with a list constructor:

gradvars = list(inf_gradvars) + list(gen_gradvars) + list(rebar_optimizer.variance_gradvars)

tuple() would probably work too.