深度学习 第3页
学习算法的一些记录~
Deep Learning Note 39 多头注意力-MuQYY的博客

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...
MuQYY的头像-MuQYY的博客钻石会员MuQYY1年前
0660
Deep Learning Note 40 Transformer-MuQYY的博客

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...
MuQYY的头像-MuQYY的博客钻石会员MuQYY1年前
0610
Deep Learning Note 37 注意力评分(Attention Score)-MuQYY的博客

Deep Learning Note 37 注意力评分(Attention Score)

import math import torch from torch import nn from d2l import torch as d2l # 遮掩softmax操作 def masked_softmax(X, valid_lens): """通过最后一个轴上遮蔽元素来执行 sof...
MuQYY的头像-MuQYY的博客钻石会员MuQYY1年前
0610
Deep Learning Note 41 风格迁移-MuQYY的博客

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...
MuQYY的头像-MuQYY的博客钻石会员MuQYY1年前
0500
Flow Matching的数学原理-MuQYY的博客

Flow Matching的数学原理

这篇文章介绍了Flow Matching作为一种生成模型训练方法,将其视为扩散模型的更通用形式。其核心思想是将数据视为在流场中运动的粒子,通过学习一个与时间相关的向量场来引导粒子从先验分布移动...
MuQYY的头像-MuQYY的博客钻石会员MuQYY4个月前
0337