duvenaud / relax

Optimizing control variates for black-box gradient estimation

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

about the d z_tilde / d logits

thudzj opened this issue · comments

I found that in the Appendix B of paper, v' can still differentiate with respect to \theta but the code (https://github.com/duvenaud/relax/blob/master/pytorch_toy.py#L105) omits it. Why? Because the effect of it is small?

@wgrathwohl I think @thudzj is right, and I've made a slight mistake in my implementation. If you think so, too, I'd be happy to make a PR with the change.

Sorry and thanks!

@sdrobert did you make a PR?

@agadetsky I've just submitted the PR. AFAICT it's working well now and converges a bit faster. Please note that the pytorch implementation was all my doing and thus the bug is entirely my fault. Sorry for the trouble.

Though I've included the concrete relaxation as preprocessing z and z_tilde in the RELAX estimator because every other source in the repository does this, it is not integral to RELAX. Consider removing sig_z and sig_z_tilde from the implementation, depending on whether you converge more quickly with it.

A quick plug: I've since written up RELAX and other estimators in pydrobert-pytorch. The interface is much more flexible, there's support for categorical variables, and I've written multiple tests to verify the integrity of the estimators. The package is available through PyPI and Conda.

@sdrobert Thank you very much! Do you have any examples for using pydrobert-pytorch?

@sdrobert If you have any example training RELAX using your library can you share it?

@agadetsky A cookbook is definitely on my to-do list. Currently, I'm adding more functionality according to the experimentation I'm doing. The best you'll get right now are in my unit tests:
here and here.

@sdrobert I get it, thank you, I think it will be enough.