86aca57545cfe312151cc35528035cd9c0aafe2d,art/classifiers/pytorch.py,PyTorchClassifier,predict,#PyTorchClassifier#Any#Any#,48
Before Change
// Run prediction
preds = self._forward_at(torch.from_numpy(inputs), self._logit_layer).detach().numpy()
if not logits:
exp = np.exp(preds - np.max(preds, axis=1, keepdims=True))
preds = exp / np.sum(exp, axis=1, keepdims=True)
return preds
After Change
if logits:
preds = logit_output.detach().numpy()
else:
preds = output.detach().numpy()
return preds
def fit(self, inputs, outputs, batch_size=128, nb_epochs=10):
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 4
Instances
Project Name: IBM/adversarial-robustness-toolbox
Commit Name: 86aca57545cfe312151cc35528035cd9c0aafe2d
Time: 2018-05-17
Author: M.N.Tran@ibm.com
File Name: art/classifiers/pytorch.py
Class Name: PyTorchClassifier
Method Name: predict
Project Name: Pinafore/qb
Commit Name: e604607e0a26bd5ca244b60dba8769779f2f07a4
Time: 2018-04-19
Author: sjtufs@gmail.com
File Name: qanta/guesser/dan.py
Class Name: DanGuesser
Method Name: _guess_batch
Project Name: r9y9/wavenet_vocoder
Commit Name: 3255a7de9edd6103fe743e3867126061f2dfbba2
Time: 2017-12-30
Author: zryuichi@gmail.com
File Name: wavenet_vocoder/__init__.py
Class Name: WaveNet
Method Name: incremental_forward