7955d7dfab1b6ec0b643afba6c4ad50adb3cd132,model/base_model.py,BaseRunner,eval,#BaseRunner#Any#Any#Any#Any#,209

Before Change


            for eval_value_batch in eval_value_batches:
                eval_values.append([x.tolist() for x in eval_value_batch])  // numpy.array.toList
            total_loss += cur_avg_loss * cur_num
            if progress:
                pbar.update(iter_idx)
        if progress:
            pbar.finish()
        loss = float(total_loss) / total
        data_set.reset()

After Change


                self._eval_batches(batches, eval_tensor_names=eval_tensor_names, **eval_args)
            if params.supervise:
                num_corrects += cur_num_corrects
                num_wrongs += cur_num_wrongs
                cur_num = sum(batch[NUM] for batch in batches)
                total_loss += cur_avg_loss * cur_num
            for eval_value_batch in eval_value_batches:
                eval_values.append([x.tolist() for x in eval_value_batch])  // numpy.array.toList

        // For printing results to stdout and log
        if params.supervise:
            total = num_corrects + num_wrongs
            loss = float(total_loss) / total

            acc = float(num_corrects) / total
            string = "%s at epoch %d: acc = %.2f%% = %d / %d, loss = %.4f" % \
                     (data_set.name, epoch, 100 * acc, num_corrects, total, loss)
            logging.info(string)
            print(string)
        else:
            loss, acc = None, None

        // For outputting eval json files
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 5

Instances


Project Name: wenwei202/iss-rnns
Commit Name: 7955d7dfab1b6ec0b643afba6c4ad50adb3cd132
Time: 2016-07-19
Author: seominjoon@gmail.com
File Name: model/base_model.py
Class Name: BaseRunner
Method Name: eval


Project Name: autorope/donkeycar
Commit Name: 468b7ab7a48a6712991dcbb4ec399a4dc95bd091
Time: 2016-12-14
Author: wroscoe@gmail.com
File Name: manage.py
Class Name:
Method Name: drive_loop


Project Name: autorope/donkeycar
Commit Name: 0013a2f5b1cf960ea722e433f5ef9d66809cd618
Time: 2016-12-28
Author: wroscoe@gmail.com
File Name: car.py
Class Name: Car
Method Name: drive_loop