343392813338ae7b10b0a3bbb3b5a9a7da6e588d,lib/model/losses_plaid.py,LossWrapper,__call__,#LossWrapper#Any#Any#,608

Before Change


        
        loss = 0.0
        for func, weight in zip(self._loss_functions, self._loss_weights):
            loss += (K.mean(func(y_true, y_pred)) * weight)
        return loss

After Change


            if isinstance(func, DSSIMObjective):
                // Extract Image Patches in SSIM requires that y_pred be of a known shape, so
                // specifically reshape the tensor.
                n_pred = K.reshape(n_pred, K.int_shape(y_pred))
            this_loss = func(n_true, n_pred)
            loss_dims = K.ndim(this_loss)
            loss += (K.mean(this_loss, axis=list(range(1, loss_dims))) * weight)
        return loss
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 4

Non-data size: 4

Instances


Project Name: deepfakes/faceswap
Commit Name: 343392813338ae7b10b0a3bbb3b5a9a7da6e588d
Time: 2020-08-27
Author: 36920800+torzdf@users.noreply.github.com
File Name: lib/model/losses_plaid.py
Class Name: LossWrapper
Method Name: __call__


Project Name: PacktPublishing/Deep-Reinforcement-Learning-Hands-On
Commit Name: 02716e101ec2a8eb7284f95b17a7e589ffbc075d
Time: 2017-10-18
Author: max.lapan@gmail.com
File Name: ch06/01_dqn_pong.py
Class Name: ImageWrapper
Method Name: _observation


Project Name: scikit-learn-contrib/DESlib
Commit Name: f0c15f219b0761b14329ddd416cda82fa4bae841
Time: 2018-03-28
Author: rafaelmenelau@gmail.com
File Name: deslib/dcs/mcb.py
Class Name: MCB
Method Name: estimate_competence


Project Name: dmlc/gluon-cv
Commit Name: 0fd13ccd7e61c9186127993080240c07b7ad905e
Time: 2019-10-28
Author: yizhu59@gmail.com
File Name: scripts/action-recognition/test_recognizer.py
Class Name:
Method Name: test