google-deepmind/dm-haiku

Document Typo

keep9oing opened this issue · 0 comments

https://dm-haiku.readthedocs.io/en/latest/notebooks/parameter_sharing.html

I'm following the tutorial on parameter sharing in the document.

The last example code has some typos I think..

wrapper = Wrapper()
transformed_f = hk.transform(wrapper.f)
params_f = transformed_f.init(rng, x)
transformed_g = hk.transform(wrapper.f)
params_g = transformed_g.init(rng, x)

should be

wrapper = Wrapper()
transformed_f = hk.transform(wrapper.f)
params_f = transformed_f.init(rng, x)
transformed_g = hk.transform(wrapper.g)
params_g = transformed_g.init(rng, x)

wrapper.f->wrapper.g.