theano_funcs.py 文件源码

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

项目:convnet-for-geometric-matching 作者: hjweide 项目源码 文件源码
def create_infer_func(layers):
    Xa, Xb = T.tensor4('Xa'), T.tensor4('Xb')
    Xa_batch, Xb_batch = T.tensor4('Xa_batch'), T.tensor4('Xb_batch')

    Tp = get_output(
        layers['trans'],
        inputs={
            layers['inputa']: Xa, layers['inputb']: Xb,
        }, deterministic=True,
    )

    infer_func = theano.function(
        inputs=[theano.In(Xa_batch), theano.In(Xb_batch)],
        outputs=Tp,
        givens={
            Xa: Xa_batch, Xb: Xb_batch,  # Ia, Ib
        }
    )

    return infer_func
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号