6e5cf676b113af8d70e34224f23bc8eace618856,mloop/nnlearner.py,SingleNeuralNet,fit,#SingleNeuralNet#Any#Any#,120
Before Change
})
self.log.debug("Fit neural network with total training cost "
+ str(self.tf_session.run(
self.loss_func,
feed_dict={self.input_placeholder: params,
self.output_placeholder: [[c] for c in costs],
self.regularisation_coefficient_placeholder: self.regularisation_coefficient,
}) )
+ ", with unregularized cost "
+ str(self .tf_session.run(
self.loss_func ,
feed_dict={self.input_placeholder: params,
self.output_placeholder: [[c] for c in costs],
self.regularisation_coefficient_placeholder: 0,
After Change
// - if the new loss is greater than the threshold then we haven"t improved much, so stop
// - else start from the top
while True:
threshold = 0.8 * self._loss(params, costs)[0]
for i in range(self.train_epochs):
// Split the data into random batches, and train on each batch
indices = np.random.permutation(len(params))
for j in range(math.ceil(len(params) / self.batch_size)):
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 8
Instances Project Name: michaelhush/M-LOOP
Commit Name: 6e5cf676b113af8d70e34224f23bc8eace618856
Time: 2017-05-02
Author: harry.slatyer@gmail.com
File Name: mloop/nnlearner.py
Class Name: SingleNeuralNet
Method Name: fit
Project Name: IBM/adversarial-robustness-toolbox
Commit Name: 64764718080b11c8fb91df34c12e0ce8ac54aa4e
Time: 2018-05-15
Author: M.N.Tran@ibm.com
File Name: art/classifiers/pytorch.py
Class Name: PyTorchClassifier
Method Name: fit
Project Name: IBM/adversarial-robustness-toolbox
Commit Name: 9b9a42de05056b418f98e3635f2cffd747123548
Time: 2018-05-16
Author: M.N.Tran@ibm.com
File Name: art/classifiers/pytorch.py
Class Name: PyTorchClassifier
Method Name: loss_gradient
Project Name: michaelhush/M-LOOP
Commit Name: 6e5cf676b113af8d70e34224f23bc8eace618856
Time: 2017-05-02
Author: harry.slatyer@gmail.com
File Name: mloop/nnlearner.py
Class Name: SingleNeuralNet
Method Name: fit