Created
May 9, 2017 14:50
-
-
Save DavidGeorge528/1b456de01bc1be2bcb4b70632cf91f75 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Histories(Callback): | |
def on_train_begin(self, logs={}): | |
self.epoch = [] | |
self.history = {} | |
def on_train_end(self, logs={}): | |
return | |
def on_epoch_begin(self, epoch, logs={}): | |
self.batch = [] | |
self.history["Batch"] = {} | |
def on_epoch_end(self, epoch, logs={}): | |
self.epoch.append(epoch) | |
for k, v in logs.items(): | |
self.history.setdefault(k, []).append(v) | |
def on_batch_begin(self, batch, logs={}): | |
return | |
def on_batch_end(self, batch, logs={}): | |
self.batch.append(epoch) | |
for k, v in logs.items(): | |
self.history["Batches"].setdefault(k, []).append(v) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment