lcd.py 文件源码

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

项目:knowledgeflow 作者: 3rduncle 项目源码 文件源码
def buildFeatures(self, type='shared'):
        assert self.checkTensor('q-channels')
        assert self.checkTensor('a-channels')
        srelu = lambda name: SReLU(name=name)
        features = []
        if type == 'shared':
            q_features = self.linkFeature('q-channels', 'shared-convolution', activation='tanh')
            a_features = self.linkFeature('a-channels', 'shared-convolution', activation='tanh')
        else:
            raise Error('Not Supported')
        print('q-features', q_features._keras_shape, K.ndim(q_features))
        print('a-features', a_features._keras_shape, K.ndim(a_features))
        self.tensors['q-features'] = q_features
        self.tensors['a-features'] = a_features
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号