keras_models.py 文件源码

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

项目:knowledge-graph-keras 作者: eshijia 项目源码 文件源码
def __init__(self, config):
        self.subject = Input(shape=(config['subject_len'],), dtype='int32', name='subject_base')
        self.subject_bad = Input(shape=(config['subject_len'],), dtype='int32', name='subject_bad_base')
        self.relation = Input(shape=(config['relation_len'],), dtype='int32', name='relation_base')
        self.object_good = Input(shape=(config['object_len'],), dtype='int32', name='object_good_base')
        self.object_bad = Input(shape=(config['object_len'],), dtype='int32', name='object_bad_base')

        self.config = config
        self.model_params = config.get('model_params', dict())
        self.similarity_params = config.get('similarity_params', dict())

        # initialize a bunch of variables that will be set later
        self._models = None
        self._similarities = None
        self._object = None
        self._subject = None
        self._qa_model = None
        self._qa_model_rt = None

        self.training_model = None
        self.training_model_rt = None
        self.prediction_model = None
        self.prediction_model_rt = None
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号