3bb7ef568b248bd07022ad62c48baaa3abbd009a,chainer/optimizer.py,UpdateRule,update,#UpdateRule#Any#,183

Before Change


            for hook in six.itervalues(self._pre_update_hooks):
                hook(self, fp32_param)
            self.update_core(fp32_param)
            for hook in six.itervalues(self._post_update_hooks):
                hook(self, fp32_param)

            param.data = fp32_param.data.astype(param.dtype)
            fp32_param.grad = None
        else:
            if param.data is not None:

After Change


                fp32_param.grad /= param._loss_scale
            self._hookable.call_hooks("pre", args=(self, fp32_param,))
            self.update_core(fp32_param)
            self._hookable.call_hooks("post", args=(self, fp32_param,))

            param.data = fp32_param.data.astype(param.dtype)
            fp32_param.grad = None
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 3

Instances


Project Name: chainer/chainer
Commit Name: 3bb7ef568b248bd07022ad62c48baaa3abbd009a
Time: 2019-06-29
Author: niboshi000@gmail.com
File Name: chainer/optimizer.py
Class Name: UpdateRule
Method Name: update


Project Name: matplotlib/matplotlib
Commit Name: 18b5c87e2318218ada9799a069c0b65fae0b1e28
Time: 2017-12-18
Author: anntzer.lee@gmail.com
File Name: lib/matplotlib/rcsetup.py
Class Name:
Method Name:


Project Name: chainer/chainer
Commit Name: 3bb7ef568b248bd07022ad62c48baaa3abbd009a
Time: 2019-06-29
Author: niboshi000@gmail.com
File Name: chainer/optimizer.py
Class Name: Optimizer
Method Name: call_hooks