190d9b204a1a4798f0723c8d8d37ac5ac950909e,pycox/models/deephit.py,DeepHitSingle,predict_survival_function,#DeepHitSingle#Any#Any#Any#Any#Any#,34

Before Change


    def predict_survival_function(self, input, batch_size=8224, eval_=True, to_cpu=False,
                                  num_workers=0):
        Mighht need to set to_cpu to true if too large dataset.
        cdf = (self.predict(input, batch_size, False, eval_, False, to_cpu, num_workers)
               .softmax(1)
               [:, :-1]
               .cumsum(1)
               .cpu()
               .numpy())
        return 1 - cdf.transpose()


def make_loss_deephit(alpha, sigma):

After Change


    def predict_survival_function(self, input, batch_size=8224, eval_=True, to_cpu=False,
                                  num_workers=0):
        Might need to set to_cpu to true if too large dataset.
        pmf = self.predict_pmf(input, batch_size, eval_, to_cpu, num_workers, False)
        surv = 1 - pmf.cumsum(0)
        if tuplefy(input).type() is np.ndarray:
            surv = surv.cpu().numpy()
        return surv

    def predict_pmf(self, input, batch_size=8224, eval_=True, to_cpu=False, num_workers=0,
                    numpy=None):
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 4

Non-data size: 7

Instances


Project Name: havakv/pycox
Commit Name: 190d9b204a1a4798f0723c8d8d37ac5ac950909e
Time: 2019-05-08
Author: haavard.kvamme@gmail..com
File Name: pycox/models/deephit.py
Class Name: DeepHitSingle
Method Name: predict_survival_function


Project Name: dpressel/mead-baseline
Commit Name: e04ca1cfca8f2c7ae3918447fbd7c3b6aa1f2f59
Time: 2017-07-16
Author: dpressel@gmail.com
File Name: python/baseline/pytorch/tagger/train.py
Class Name: TaggerTrainerPyTorch
Method Name: process_output


Project Name: open-mmlab/mmdetection
Commit Name: e421e832883241bd7831bf77dc31d5fb31d7da58
Time: 2019-04-06
Author: chenkaidev@gmail.com
File Name: mmdet/ops/nms/nms_wrapper.py
Class Name:
Method Name: nms


Project Name: PacktPublishing/Deep-Reinforcement-Learning-Hands-On
Commit Name: 21fa4e7e38567e083f98c559f8f2ae0c5573ba0f
Time: 2018-02-11
Author: max.lapan@gmail.com
File Name: ch15/lib/model.py
Class Name: AgentA2C
Method Name: __call__