a8cb5fdf89cb36b1ede31ed310ee795c49cfac25,pymc3/variational/advi_minibatch.py,,_join_global_RVs,#Any#Any#,81

Before Change



        cs = [c for _, c in global_RVs.items()]
        shps = [shp for _, _, shp, _ in global_order.vmap]
        c_g = [c * tt.ones(np.prod(shp)) for c, shp in zip(cs, shps)]

    return inarray_global, uw_global, replace_global, c_g

After Change


        // Replace RVs with reshaped subvectors of the joined vector
        // The order of global_order is the same with that of global_RVs
        subvecs = [reshape_t(inarray_global[slc], shp).astype(dtyp)
                   for _, slc, shp, dtyp in global_order.vmap]
        replace_global = {v: subvec for v, subvec in zip(global_RVs, subvecs)}

        // Weight vector
        cs = [c for _, c in global_RVs.items()]
        oness = [tt.ones(v.ravel().tag.test_value.shape) for v in global_RVs]
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 4

Non-data size: 5

Instances


Project Name: pymc-devs/pymc3
Commit Name: a8cb5fdf89cb36b1ede31ed310ee795c49cfac25
Time: 2017-01-09
Author: taku.yoshioka.4096@gmail.com
File Name: pymc3/variational/advi_minibatch.py
Class Name:
Method Name: _join_global_RVs


Project Name: GPflow/GPflow
Commit Name: 5809cb0b339612434f4f332a91a2cd3e4570c34d
Time: 2018-02-26
Author: james@prowler.io
File Name: gpflow/transforms.py
Class Name: LowerTriangular
Method Name: backward_tensor


Project Name: pymc-devs/pymc3
Commit Name: a8cb5fdf89cb36b1ede31ed310ee795c49cfac25
Time: 2017-01-09
Author: taku.yoshioka.4096@gmail.com
File Name: pymc3/variational/advi_minibatch.py
Class Name:
Method Name: _join_local_RVs


Project Name: stanford-mast/nn_dataflow
Commit Name: 22fb2fe9ea4ad5ef536709aa07838d3d6c7357ee
Time: 2017-05-26
Author: mgao12@stanford.edu
File Name: nn_dataflow/LoopBlockingScheme.py
Class Name: LoopBlockingScheme
Method Name: _set_unit_cnt