627cb91321363a8bdc0920072e164ae465bae98f,art/classifiers/pytorch.py,PyTorchClassifier,predict,#PyTorchClassifier#Any#Any#,39
Before Change
if logits:
results = self._sess.run(self._logits, feed_dict=fd)
else:
results = self._sess.run(tf.nn.softmax(self._logits), feed_dict=fd)
return results
def _forward_at(self, inputs, layer):
After Change
preds = self._forward_at(inputs, self._logit_layer)
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=10):
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 4
Instances
Project Name: IBM/adversarial-robustness-toolbox
Commit Name: 627cb91321363a8bdc0920072e164ae465bae98f
Time: 2018-05-14
Author: M.N.Tran@ibm.com
File Name: art/classifiers/pytorch.py
Class Name: PyTorchClassifier
Method Name: predict
Project Name: tensorflow/minigo
Commit Name: 76af726f4d58fd445496734a41e22ff36afe3657
Time: 2018-02-06
Author: brian.kihoon.lee@gmail.com
File Name: dual_net.py
Class Name: StatisticsCollector
Method Name: collect
Project Name: tensorflow/cleverhans
Commit Name: b214ee503bf7e8a27b6d89460e49fb12a5b8d947
Time: 2016-11-22
Author: ngp5056@cse.psu.edu
File Name: cleverhans/attacks.py
Class Name:
Method Name: jacobian