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.")
评论列表
文章目录