retina_net.py 文件源码

python
阅读 24 收藏 0 点赞 0 评论 0

项目:qtim_ROP 作者: QTIM-Lab 项目源码 文件源码
def extract_features(self, img_data):

        features = self.cnn.evaluate(img_data)
        return features

# class ROCCallback(Callback):
# 
#     def __init__(self, training_data, validation_data):
#         super(Roc).__init__
#         self.x = training_data[0]
#         self.y = training_data[1]
#         self.x_val = validation_data[0]
#         self.y_val = validation_data[1]
# 
#     def on_train_begin(self, logs={}):
#         return
# 
#     def on_train_end(self, logs={}):
#         return
# 
#     def on_epoch_begin(self, epoch, logs={}):
#         return
# 
#     def on_epoch_end(self, epoch, logs={}):
#         y_pred = self.model.predict(self.x)
#         roc = roc_auc_score(self.y, y_pred)
# 
#         y_pred_val = self.model.predict(self.x_val)
#         roc_val = roc_auc_score(self.y_val, y_pred_val)
# 
#         print(
#         '\rroc-auc: %s - roc-auc_val: %s' % (str(round(roc, 4)), str(round(roc_val, 4))), end=100 * ' ' + '\n')
#         return
# 
#     def on_batch_begin(self, batch, logs={}):
#         return
# 
#     def on_batch_end(self, batch, logs={}):
#         return
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号