8828f67d5d41b88881bd0d7d17a9dbc9a37f98b7,models/dist_model.py,DistModel,forward,#DistModel#Any#Any#Any#,74

Before Change


        if self.spatial:
            L = [convert_output(x) for x in self.d0]
            height = functools.reduce(lcm, [x.shape[0] for x in L])
            width  = functools.reduce(lcm, [x.shape[1] for x in L])
            L = [np.repeat(np.repeat(x, height//x.shape[0], 0), width//x.shape[1], 1) for x in L]
            L = np.mean(np.concatenate(L, 2) * len(L), 2)
            return L
        else:

After Change


            L = [convert_output(x) for x in self.d0]
            spatial_shape = self.spatial_shape
            if spatial_shape is None:
                spatial_shape = (max([x.shape[0] for x in L])*self.spatial_factor, max([x.shape[1] for x in L])*self.spatial_factor)
            
            L = [skimage.transform.resize(x, spatial_shape, order=self.spatial_order, mode="edge") for x in L]
            
            L = np.mean(np.concatenate(L, 2) * len(L), 2)
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 3

Instances


Project Name: richzhang/PerceptualSimilarity
Commit Name: 8828f67d5d41b88881bd0d7d17a9dbc9a37f98b7
Time: 2018-04-10
Author: cobarnes@adobe.com
File Name: models/dist_model.py
Class Name: DistModel
Method Name: forward


Project Name: SheffieldML/GPy
Commit Name: 600b1bde3cb4dd1325c5a2c7b2ccea22967e6ecc
Time: 2014-03-14
Author: ibinbei@gmail.com
File Name: GPy/kern/_src/kern.py
Class Name: CombinationKernel
Method Name: __init__


Project Name: MycroftAI/padatious
Commit Name: 9db56d70bdf8205143b833e6fd72502e8cb619da
Time: 2017-10-02
Author: matthew3311999@gmail.com
File Name: padatious/util.py
Class Name:
Method Name: resolve_conflicts