layers.py 文件源码

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

项目:ntee 作者: studio-ousia 项目源码 文件源码
def call(self, inputs, mask=None):
        l1 = inputs[0]
        l2 = inputs[1]

        def f(i, l1, l2):
            return T.clip(T.batched_tensordot(l1[i], l2[i], 1), FLOAT_MIN, FLOAT_MAX).astype(FLOATX)

        return theano.map(f, T.arange(l1.shape[0]), non_sequences=[l1, l2])[0]
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号