mnist_pixelvae_train.py 文件源码

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

项目:PixelVAE 作者: igul222 项目源码 文件源码
def binarize(images):
    """
    Stochastically binarize values in [0, 1] by treating them as p-values of
    a Bernoulli distribution.
    """
    return (
        np.random.uniform(size=images.shape) < images
    ).astype(theano.config.floatX)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号