560cb94519ad5a5eed3adc323a9e1ad3cf0690e9,keras/callbacks.py,BaseLogger,on_batch_end,#BaseLogger#Any#Any#,120
Before Change
batch_size = logs.get("size", 0)
self.current += batch_size
loss = logs.get("loss")
self.log_values.append(("loss", loss))
self.tot_loss += loss * batch_size
if self.params["show_accuracy"]:
accuracy = logs.get("accuracy")
self.log_values.append(("acc.", accuracy))
self.tot_acc += accuracy * batch_size
// skip progbar update for the last batch; will be handled by on_epoch_end
if self.verbose and self.current < self.params["nb_sample"]:
self.progbar.update(self.current, self.log_values)
def on_epoch_end(self, epoch, logs={}):
After Change
self.log_values = []
def on_batch_end(self, batch, logs={}):
batch_size = logs.get("size", 0)
self.seen += batch_size
for k, v in logs.items():
self.log_values.append((k, v))
if k in self.totals:
self.totals[k] += v * batch_size
else:
self.totals[k] = v * batch_size
// skip progbar update for the last batch; will be handled by on_epoch_end
if self.verbose and self.seen < self.params["nb_sample"]:
self.progbar.update(self.seen, self.log_values)
def on_epoch_end(self, epoch, logs={}):
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 29
Instances
Project Name: keras-team/keras
Commit Name: 560cb94519ad5a5eed3adc323a9e1ad3cf0690e9
Time: 2015-06-30
Author: francois.chollet@gmail.com
File Name: keras/callbacks.py
Class Name: BaseLogger
Method Name: on_batch_end
Project Name: keras-team/keras
Commit Name: 560cb94519ad5a5eed3adc323a9e1ad3cf0690e9
Time: 2015-06-30
Author: francois.chollet@gmail.com
File Name: keras/callbacks.py
Class Name: BaseLogger
Method Name: on_batch_end
Project Name: keras-team/keras
Commit Name: 560cb94519ad5a5eed3adc323a9e1ad3cf0690e9
Time: 2015-06-30
Author: francois.chollet@gmail.com
File Name: keras/callbacks.py
Class Name: RemoteMonitor
Method Name: on_batch_end
Project Name: keras-team/keras
Commit Name: 560cb94519ad5a5eed3adc323a9e1ad3cf0690e9
Time: 2015-06-30
Author: francois.chollet@gmail.com
File Name: keras/callbacks.py
Class Name: History
Method Name: on_batch_end