model.py 文件源码

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

项目:dgm 作者: ashwindcruz 项目源码 文件源码
def decode(self,z):
        # pdb.set_trace()
        a = self.a_enc

        # If this function is coming from the sampling call, the batch size of z and a won't match. Manually handle that here.
        if (a.shape[0]!=z.shape[0]):
            a.volatile = 'ON'
            batch_size = z.shape[0]
            a.data = a.data[0:batch_size,:]

        net_input = F.concat((z,a), axis=1)

        h = F.crelu(self.plinx0(net_input))

        for i in range(self.num_layers-1):
            layer_name = 'plinx' + str(i+1)
            h = F.crelu(self[layer_name](h))

        self.pmu = self.plinx_mu(h)
        self.pln_var = self.plinx_ln_var(h)

        return self.pmu, self.pln_var
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号