9e49dce4a0b35b7daba7fa5d4ed529e36979a19a,src/classifiers/keras.py,KerasClassifier,predict,#KerasClassifier#Any#Any#,97
Before Change
preds = self._preds([inputs])[0]
if not logits:
// TODO check axis and shapes
preds = np.exp(preds) / np.sum(np.exp(preds), axis=0)
return preds
def fit(self, inputs, outputs, batch_size=128, nb_epochs=20):
After Change
k.set_learning_phase(0)
preds = self._preds([inputs])[0]
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
def fit(self, inputs, outputs, batch_size=128, nb_epochs=20):
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 5
Instances
Project Name: IBM/adversarial-robustness-toolbox
Commit Name: 9e49dce4a0b35b7daba7fa5d4ed529e36979a19a
Time: 2018-04-16
Author: Maria-Irina.Nicolae@ibm.com
File Name: src/classifiers/keras.py
Class Name: KerasClassifier
Method Name: predict
Project Name: SPFlow/SPFlow
Commit Name: 5f12688e83bfb0acadb6b8ab56c293ed123e3a7a
Time: 2019-03-14
Author: molina@cs.tu-darmstadt.de
File Name: src/spn/algorithms/EM.py
Class Name:
Method Name: sum_em_update
Project Name: rusty1s/pytorch_geometric
Commit Name: 45a03ac258234ba49c0a43d46ae022493190591e
Time: 2019-03-26
Author: matthias.fey@tu-dortmund.de
File Name: torch_geometric/nn/models/autoencoder.py
Class Name: VGAE
Method Name: kl_loss