b41d4f38436e4a090c940dbd3bc7e2afd39a283e,gpflow/optimizers/natgrad.py,NaturalGradient,_natgrad_steps,#NaturalGradient#Any#Any#,113

Before Change


            self._natgrad_step(loss_fn, q_mu, q_sqrt, xi_transform)

        with tf.name_scope(f"{self._name}/natural_gradient_steps"):
            list(map(natural_gradient_step, *zip(*parameters)))

    def _natgrad_step(
        self, loss_fn: Callable, q_mu: Parameter, q_sqrt: Parameter, xi_transform: XiTransform
    ):

After Change


        
        q_mus, q_sqrts, xis = zip(*parameters)
        unconstrained_variables = [
            p.unconstrained_variable for params in (q_mus, q_sqrts) for p in params
        ]

        with tf.GradientTape(watch_accessed_variables=False) as tape:
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 4

Non-data size: 4

Instances


Project Name: GPflow/GPflow
Commit Name: b41d4f38436e4a090c940dbd3bc7e2afd39a283e
Time: 2020-04-23
Author: st--@users.noreply.github.com
File Name: gpflow/optimizers/natgrad.py
Class Name: NaturalGradient
Method Name: _natgrad_steps


Project Name: dmlc/gluon-nlp
Commit Name: bb82889e5cc39ef7a9e7fefdfb7b51fe8c605cf9
Time: 2018-09-28
Author: szhengac@users.noreply.github.com
File Name: scripts/nmt/bleu.py
Class Name:
Method Name: compute_bleu


Project Name: streamlit/streamlit
Commit Name: a410b46917e3c34e74f67e6262cfa42e8fc7849c
Time: 2019-02-27
Author: tconkling@gmail.com
File Name: lib/streamlit/image_proto.py
Class Name:
Method Name: marshall_images


Project Name: GPflow/GPflow
Commit Name: 5e599fb01df65d156a40f7a138ab6627a06a50db
Time: 2020-05-07
Author: 6815729+condnsdmatters@users.noreply.github.com
File Name: gpflow/optimizers/natgrad.py
Class Name: NaturalGradient
Method Name: _natgrad_steps