概述深度生成网络

(1)变分自编码器(Variational AutoEncoder, VAE)|系统解读Keras实现Generative Deep Learning

完整代码见附录 1.设置 import numpy as np import tensorflow as tf from tensorflow import keras from tensorflow.keras import layers 2.创建采样层 class Sampling(layers.Layer): “””Uses (z_mean, z_log_var) to sample z, the vector encoding a digit.””” def call(self, inputs): z_mean, z_log_var = inputs batch = tf.shape(z_mean)[0] dim = tf.shape(z_mean)[1] epsilon = tf.keras.backend.random_normal(shape=(batch, dim)) return z_mean + tf.exp(0.5 * z_log_var) * epsilon 3.构建编码器 latent_dim = 2 encoder_inputs = keras.Input(shape=(28, 28, 1)) ...

系统解读Keras实现Generative Deep Learning

Keras官网给出了一套Generative Deep Learning模型的示例,很有代表性。 官网代码参考: Variational AutoEncoder GAN overriding Model.train_step WGAN-GP overriding Model.train_step Neural style transfer Deep Dream Conditional GAN CycleGAN Character-level text generation with LSTM PixelCNN Density estimation using Real NVP Face image generation with StyleGAN Text generation with a miniature GPT Vector-Quantized Variational Autoencoders WGAN-GP with R-GCN for the generation of small molecular graphs

《Generative Deep Learning》读书

关于这本书 书名 Generative Deep Learning: Teaching Machines to paint, write, compose and play 作者 David Foster 购买电子版 oreilly amazon 下载电子版 出于版权问题,我不能分享该文件,推荐购买电子版,如果实在不想消费美刀下载方法可以参考博文Library Genesis不能下载解决方法 勘误 勘误 代码 github(基于Tensorflow) github(基于PyTorch) 概况 Generative modeling 生成建模是人工智能中最热门的话题之一。现在可以教机器在人类活动中表现出色,例如绘画、写作和作曲。本书的读者对象是机器学习工程师和数据科学家,本书讲介绍如何创建一些最令人印象深刻的生成式深度学习模型示例,例如variational autoencoders变分自动编码器、生成对抗网络 (GAN)、encoder-decoder 编码器-解码器模型和world models。 作者David Foster展示了每种模型的网络结构。从深度学习的基础开始,然后发展到该领域的一些最前沿的算法。 这本书里一...

概述|Diffusion Models扩散模型|学习笔记

Diffusion models扩散模型 DDPM(Denoising Diffusion Probabilistic Models) 代表性文章 Deep Unsupervised Learning using Nonequilibrium Thermodynamics https://arxiv.org/abs/1503.03585 Generative Modeling by Estimating Gradients of the Data Distribution https://arxiv.org/abs/1907.05600 Denoising diffusion probabilistic model https://arxiv.org/abs/2006.11239 Improved Denoising Diffusion Probabilistic Models https://arxiv.org/abs/2102.09672 Diffusion Models Beat GANs on Image Synthesis https://arxiv.org/pdf/2105.05233.pdf   网...

GAN vs VAE

VAE的问题 VAE的一个问题是,为了获得p(x)的良好近似值(其中p(x)是图像的分布),您需要记住潜在空间z中的所有细节。在VAE的简单框架中,后验pθ(z|x)的近似值通常过于简化,因为我们无法参数化复杂分布(通常是单峰分布,类似于各向同性高斯分布)。 一种减少限制并更接近 pθ(z|x) 分布的方法是引入flows[1],或将VAE框架与马尔可夫链蒙特卡罗耦合,后者可以渐近地接近真后验值[2]。 因此,VAE有一个很好的理论,但主要问题是固定参数化pθ(z|x) 通常比图像的真实复杂分布过于简化。这不是GANs的问题,因为G被迫生成看起来真实的样本(代价是具有折叠模式,其中生成器生成来自真实分布的一个单一模式的样本)。 Vincent Dumonlin[3]最近开发的一种有趣的方法是引入一种可以执行推理和生成的GAN。对于VAE框架来说,这似乎是一种具有挑战性的方法。 演示 下面是一些有趣的情节,来自谢尔布鲁克大学的逆向推理演示。 真实的图像流形p(x): VAE / GAN如何近似p(x)。 可以看到,VAE趋向于大致近似此分布。   参考文献 [1] [1505.05770] Variational ...

生成模型Generative Model|深度学习

What is a generative model? Class of unsupervised learning algorithms.一类无监督学习算法。 Given samples x~p_data , learns representation of that distribution, P_model for the following tasks: Density estimation Sample generation Why use generative models? Un-supervised / Semi-supervised learning. 无监督/半监督学习。 Working with multi-modal output – multiple different correct answers. 使用多模式输出–多个不同的正确答案。 Sample from a desired distribution (e.g. from the posterior). 从所需的分布(例如从后验)取样。 Realistic samples for artwork, super-resolution, co...