16d2eb3061f1bed8ade390c5e2a2c1de9daa3509,theanolm/optimizers/adamoptimizer.py,AdamOptimizer,_get_model_updates,#AdamOptimizer#,93

Before Change


        alpha /= 1.0 - (self._gamma_m ** timestep_new)

        result = []
        for name, param in self.network.params.items():
            m_gradient = self.params[name + ".mean_gradient"]
            ms_gradient = self.params[name + ".mean_sqr_gradient"]
            rms_gradient = tensor.sqrt(ms_gradient) + self._epsilon
            param_new = param - (alpha * m_gradient / rms_gradient)
            result.append((param, param_new))
        result.append((timestep, timestep_new))
        return result

    def reset(self):

After Change


        alpha *= tensor.sqrt(1.0 - (self._gamma_ms ** timestep_new))
        alpha /= 1.0 - (self._gamma_m ** timestep_new)

        updates = dict()
        for name, param in self.network.params.items():
            m_gradient = self.params[name + ".mean_gradient"]
            ms_gradient = self.params[name + ".mean_sqr_gradient"]
            rms_gradient = tensor.sqrt(ms_gradient) + self._epsilon
            updates[name] = -m_gradient / rms_gradient
        self._normalize(updates)

        result = []
        for name, param in self.network.params.items():
            update = updates[name]
            result.append((param, param + alpha * update))
        result.append((timestep, timestep_new))
        return result

    def reset(self):
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 27

Instances


Project Name: senarvi/theanolm
Commit Name: 16d2eb3061f1bed8ade390c5e2a2c1de9daa3509
Time: 2015-12-04
Author: seppo.git@marjaniemi.com
File Name: theanolm/optimizers/adamoptimizer.py
Class Name: AdamOptimizer
Method Name: _get_model_updates


Project Name: senarvi/theanolm
Commit Name: 16d2eb3061f1bed8ade390c5e2a2c1de9daa3509
Time: 2015-12-04
Author: seppo.git@marjaniemi.com
File Name: theanolm/optimizers/adamoptimizer.py
Class Name: AdamOptimizer
Method Name: _get_model_updates


Project Name: senarvi/theanolm
Commit Name: 16d2eb3061f1bed8ade390c5e2a2c1de9daa3509
Time: 2015-12-04
Author: seppo.git@marjaniemi.com
File Name: theanolm/optimizers/adagradoptimizer.py
Class Name: AdaGradOptimizer
Method Name: _get_model_updates


Project Name: senarvi/theanolm
Commit Name: 16d2eb3061f1bed8ade390c5e2a2c1de9daa3509
Time: 2015-12-04
Author: seppo.git@marjaniemi.com
File Name: theanolm/optimizers/rmspropsgdoptimizer.py
Class Name: RMSPropSGDOptimizer
Method Name: _get_model_updates