variational.py 文件源码

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

项目:CopyNet 作者: MultiPath 项目源码 文件源码
def compile_sample(self):
        """
        build the sampler function here <:::>
        """
        # context vectors (as)
        self.decoder.build_sampler()

        l = T.iscalar()
        logger.info("compiling the computational graph :: action sampler")
        self.action_sampler = theano.function([l], self.rng.normal((l, self.config['action_dim'])))

        action = T.matrix()
        logger.info("compiling the compuational graph ::transform function::")
        self.transform = theano.function([action], self.context_trans(action))
        logger.info("display functions compile done.")
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号