logo
Loading...

Day 88 的 self.validation_data 的意義是什麼? - Cupoy

def on_epoch_end(self, epoch, logs = {}, thres=0.5...

ml100-2-d88,ml100-2

Day 88 的 self.validation_data 的意義是什麼?

2019/08/01 04:54 PM
機器學習新手論壇
凌璟騰
觀看數:0
回答數:2
收藏數:0
ml100-2-d88
ml100-2

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

        logs = logs or {}

        print(self.params['metrics'])

        y_true = self.validation_data[1].argmax(axis = 1)

        y_pred = self.model.predict(self.validation_data[0])

        y_pred = (y_pred[:, 1] >= thres) * 1

        

        logs["val_f1sc"] = f1_score(y_true = y_true, y_pred = y_pred, average="weighted")


我一直找不到哪裡有說明,可以提供一下嗎?