keras_callbacks_example icon indicating copy to clipboard operation
keras_callbacks_example copied to clipboard

Why do I get the results are different from you, and I can not understand?

Open zhouhao-learning opened this issue 7 years ago • 1 comments

I want to get all the acc, but the result is this, can you tell me which troops? 2017-04-08 16-59-04

This is my code

import keras
from mock.mock import self
from sklearn.metrics import roc_auc_score



class Histories(keras.callbacks.Callback):
    def on_train_begin(self, logs={}):
        self.acc = []
        return

    def on_train_end(self, logs={}):
        return

    def on_epoch_begin(self, epoch, logs={}):
        return

    def on_epoch_end(self, epoch, logs={}):

        return

    def on_batch_begin(self, batch, logs={}):
        return

    def on_batch_end(self, batch, logs={}):
        self.acc.append(logs.get('acc'))
        return

zhouhao-learning avatar Apr 08 '17 09:04 zhouhao-learning

Mine was on keras 1.x, probably that's the reason?

keunwoochoi avatar Apr 10 '17 12:04 keunwoochoi