浅谈Diffusion ①理解 Latent Diffusion Model
Paper :High-Resolution Image Synthesis with Latent Diffusion Models 这篇文章是Stable Diffuion的开山之作了,接下来让我带大家看看这篇文章讲了些什么吧~ 1、研究背景 However, since thes...
为什么在VAE中,损失函数往往是最大化ELBO
因为 $$ KL = -ELBO + p_\theta(z|x_i) $$ 则有 $$ KL + ELBO = p_\theta(z|x_i) $$ 其中$p_\theta(z|x_i)$为一个常量 因此最大化ELBO实际上就是最小化$KL$散度
利用拓扑排序计算工程完成的最短时间
题目描述 有一项大的工程,工程中有许多前后依赖的子任务,每个子任务都规划了完成需要的天数,假设给出用字母表示的事件结点,整个工程的开始事件用A表示,工程结束事件用Z表示,用事件结点有...
23级中国矿业大学数据结构期末考试回忆版
一、分析题(30分) 1、ABCD入栈序列,找出以B开头的所有合法出栈序列 2、双链表插入节点过程,用C++答过程(prev, next) 3、给二叉树的中序和后序序列,构建二叉树并且写出前序序列 4、计算完全...
Score-based模型图像生成的底层原理
一、问题定义 所谓图像生成实际上是拟合一个概率密度函数,经过解码器去生成图片。 假设我们有一个概率密度函数$P(x)$,其中$x$是一个图像,且$x\in R^d, 例如d=64\times64\times3$ 。现在,我...
Deep Learning Note 41 风格迁移
import torch import torchvision from torchvision.models import vgg19, VGG19_Weights from torch import nn from d2l import torch as d2l d2l.set_figsize() content_img = d2l.Image.open...
前序遍历和后序遍历判断是否二叉树唯一
题目描述 假设二叉树中的所有键值都是不同的正整数。唯一的二元树可以通过给定的后序和顺序遍历序列,或前序和顺序遍历序列来确定。但是,如果仅给出后序和前序遍历序列,则相应的树可能不再...
Deep Learning Note 40 Transformer
import math import torch import pandas as pd from torch import nn from d2l import torch as d2l # 基于位置的前馈网络(实际上就是一个两层的全连接) class PositionWiseFFN(nn.Module): de...
Deep Learning Note 39 多头注意力
import math import torch from torch import nn from d2l import torch as d2l # 缩放点积注意力 class DotProductAttention(nn.Module): def __init__(self, dropout, **kwargs): super(DotPr...
Deep Learning Note 38 Seq2Seq with Attention
import torch import torch.nn as nn from d2l import torch as d2l class AttentionDecoder(d2l.Decoder): """带有注意力机制的解码器基本接口""" def __init__...







