722552e32c4c218b00abcdb1464dd2dbcbfa0f2f,src/garage/np/algos/cem.py,CEM,train,#CEM#Any#,87

Before Change


            "n_samples is too low. Make sure that n_samples * best_frac >= 1")
        self.n_params = len(self.cur_mean)

        return super().train(runner)

    def train_once(self, itr, paths):
        Perform one step of policy optimization given one batch of samples.

After Change


        last_return = None

        for _ in runner.step_epochs():
            for _ in range(self._n_samples):
                runner.step_path = runner.obtain_samples(runner.step_itr)
                last_return = self.train_once(runner.step_itr,
                                              runner.step_path)
                runner.step_itr += 1

        return last_return

    def train_once(self, itr, paths):
        Perform one step of policy optimization given one batch of samples.
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 6

Instances


Project Name: rlworkgroup/garage
Commit Name: 722552e32c4c218b00abcdb1464dd2dbcbfa0f2f
Time: 2020-06-01
Author: ericyihc@usc.edu
File Name: src/garage/np/algos/cem.py
Class Name: CEM
Method Name: train


Project Name: rlworkgroup/garage
Commit Name: 722552e32c4c218b00abcdb1464dd2dbcbfa0f2f
Time: 2020-06-01
Author: ericyihc@usc.edu
File Name: src/garage/np/algos/cma_es.py
Class Name: CMAES
Method Name: train


Project Name: tensorflow/tensorflow
Commit Name: 6aab1b8d4491fae035aeec06016d3442f165bd4d
Time: 2020-11-11
Author: ruhler@google.com
File Name: tensorflow/compiler/mlir/tfr/examples/mnist/mnist_train.py
Class Name:
Method Name: main