fb3d83430def1d0939126f45fdb96b270933a357,keras_rcnn/layers/losses/_rcnn.py,RCNNRegressionLoss,call,#RCNNRegressionLoss#Any#Any#,39

Before Change


    def call(self, inputs, training=None, **kwargs):
        output, target, labels_target = inputs

        loss = keras.backend.in_train_phase(lambda: self.compute_regression_loss(output, target, labels_target), keras.backend.variable(0), training=training)

        self.add_loss(loss, inputs)

        return output

After Change


        def calculate_loss():
            return self.compute_regression_loss(output, target, labels_target)
        
        loss = tensorflow.cond(keras.backend.not_equal(keras.backend.shape(output)[1], keras.backend.shape(target)[1]), no_loss, calculate_loss)

        self.add_loss(loss, inputs)
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 2

Instances


Project Name: broadinstitute/keras-rcnn
Commit Name: fb3d83430def1d0939126f45fdb96b270933a357
Time: 2017-10-30
Author: jyhung@broadinstitute.org
File Name: keras_rcnn/layers/losses/_rcnn.py
Class Name: RCNNRegressionLoss
Method Name: call


Project Name: broadinstitute/keras-rcnn
Commit Name: c9d611ab38b4c550d8828772833a63d3d3940e79
Time: 2017-11-18
Author: jyhung@broadinstitute.org
File Name: keras_rcnn/layers/object_detection/_proposal_target.py
Class Name: ProposalTarget
Method Name: call


Project Name: farizrahman4u/recurrentshop
Commit Name: 06d7bd782f6afdbe9fc0902f36248a17b2cfd1f5
Time: 2017-04-09
Author: farizrahman4u@gmail.com
File Name: recurrentshop/engine.py
Class Name: RecurrentModel
Method Name: step