0430f0811e0a5cd377b9c377e915bbbbb1572ce7,pycox/models/deephit.py,DeepHit,predict_pmf,#DeepHit#Any#Any#Any#Any#Any#Any#,399
Before Change
pmf = _pad_phi(preds.view(preds.size(0), -1)).softmax(1)[:, :-1]
pmf = pmf.view(preds.shape).transpose(0, 1).transpose(1, 2)
if numpy is None:
if tuplefy(input).type() is np.ndarray:
pmf = pmf.cpu().numpy()
elif numpy is True:
pmf = pmf.cpu().numpy()
return pmf
After Change
preds = self.predict(input, batch_size, False, eval_, False, to_cpu, num_workers)
pmf = pad_col(preds.view(preds.size(0), -1)).softmax(1)[:, :-1]
pmf = pmf.view(preds.shape).transpose(0, 1).transpose(1, 2)
return array_or_tensor(pmf, numpy, input)
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 9
Instances
Project Name: havakv/pycox
Commit Name: 0430f0811e0a5cd377b9c377e915bbbbb1572ce7
Time: 2019-10-02
Author: haavard.kvamme@gmail..com
File Name: pycox/models/deephit.py
Class Name: DeepHit
Method Name: predict_pmf
Project Name: havakv/pycox
Commit Name: 0430f0811e0a5cd377b9c377e915bbbbb1572ce7
Time: 2019-10-02
Author: haavard.kvamme@gmail..com
File Name: pycox/models/deephit.py
Class Name: DeepHit
Method Name: predict_cif
Project Name: havakv/pycox
Commit Name: cc5645de6214ad4dc98a8e995bfa2bf45d74be34
Time: 2019-12-03
Author: haavard.kvamme@gmail..com
File Name: pycox/models/utils.py
Class Name:
Method Name: array_or_tensor