d35509ef4fed2e588adb9285ee1c9bd0eb16582a,softlearning/algorithms/sql.py,SQL,_update_target,#SQL#Any#,320

Before Change


        tau = tau or self._tau

        source_params = self._Q.get_weights()
        target_params = self._Q_target.get_weights()
        self._Q_target.set_weights([
            tau * source + (1.0 - tau) * target
            for source, target in zip(source_params, target_params)
        ])

After Change


    def _update_target(self, tau=None):
        tau = tau or self._tau

        for Q, Q_target in zip(self._Qs, self._Q_targets):
            source_params = Q.get_weights()
            target_params = Q_target.get_weights()
            Q_target.set_weights([
                tau * source + (1.0 - tau) * target
                for source, target in zip(source_params, target_params)
            ])

    def _do_training(self, iteration, batch):
        Run the operations for updating training and target ops.

        feed_dict = self._get_feed_dict(batch)
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 5

Instances


Project Name: rail-berkeley/softlearning
Commit Name: d35509ef4fed2e588adb9285ee1c9bd0eb16582a
Time: 2019-02-01
Author: hartikainen@berkeley.edu
File Name: softlearning/algorithms/sql.py
Class Name: SQL
Method Name: _update_target


Project Name: keras-team/keras
Commit Name: ee179f7da155c3cb8129b954db828906886ad4e4
Time: 2015-06-08
Author: francois.chollet@gmail.com
File Name: keras/layers/core.py
Class Name: AutoEncoder
Method Name: get_output


Project Name: rail-berkeley/softlearning
Commit Name: d33c114816429c494e2a40625849d57ae2103f3f
Time: 2018-11-22
Author: hartikainen@berkeley.edu
File Name: softlearning/algorithms/sac.py
Class Name: SAC
Method Name: _update_target