d51dd50f93232f5542df1a8ccb2d91cee17c52d8,grid/app/main/sfl/cycles/cycle_manager.py,CycleManager,_average_plan_diffs,#CycleManager#Any#Any#,210

Before Change


        ]
        logging.info("raw diffs lengths: %s" % str([len(row) for row in raw_diffs]))

        sums = [reduce(th.add, param) for param in raw_diffs]
        logging.info("sums shapes: %s" % str([sum.shape for sum in sums]))

        diff_avg = [th.div(param, len(diffs)) for param in sums]
        logging.info("diff_avg shapes: %s" % str([d.shape for d in diff_avg]))

        // apply avg diff!
        _updated_model_params = [

After Change


        // check if the uploaded avg plan is iterative or not
        iterative_plan = server_config.get("iterative_plan", False)

        if iterative_plan:
            diff_avg = raw_diffs[0]
            for i, diff in enumerate(raw_diffs[1:]):
                diff_avg = avg_plan(diff_avg, diff, i + 1)
        else:
            diff_avg = avg_plan(raw_diffs)

        logging.info("diff_avg shapes: %s" % str([d.shape for d in diff_avg]))

        // apply avg diff!
        _updated_model_params = [
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 4

Instances


Project Name: OpenMined/Grid
Commit Name: d51dd50f93232f5542df1a8ccb2d91cee17c52d8
Time: 2020-07-08
Author: hericles.me@gmail.com
File Name: grid/app/main/sfl/cycles/cycle_manager.py
Class Name: CycleManager
Method Name: _average_plan_diffs


Project Name: cornellius-gp/gpytorch
Commit Name: e5a3f2208cc837f75ef312b4bd8b87ea59827bdc
Time: 2018-02-27
Author: gpleiss@gmail.com
File Name: gpytorch/models/abstract_variational_gp.py
Class Name: AbstractVariationalGP
Method Name: marginal_log_likelihood


Project Name: tensorflow/magenta
Commit Name: f2559da66ce4435a8d3a8e17dd1e4fb18508151d
Time: 2021-03-25
Author: no-reply@google.com
File Name: magenta/models/coconet/lib_graph.py
Class Name: CoconetGraph
Method Name: apply_convolution