mamba
NLP相关 seq2seq架构: 主要特征:编码器,潜空间,解码器,输入输出都是序列 CV相关 s4通过离散化过程 将参数转化为全局卷积核(Global Convolution Kernel)。这使得 S4 可以像 CNN 一样在整个序列上进行高效并行训练 。而在推理(生成)阶段,它又可以切换回递归模式
NLP相关 seq2seq架构: 主要特征:编码器,潜空间,解码器,输入输出都是序列 CV相关 s4通过离散化过程 将参数转化为全局卷积核(Global Convolution Kernel)。这使得 S4 可以像 CNN 一样在整个序列上进行高效并行训练 。而在推理(生成)阶段,它又可以切换回递归模式
问题:它的输入是什么?它的输出是什么?它是怎么得到这个输出的?它的效果怎样么? UNet OutPut 输出:一个与原图大小相同的多通道图,通道数对应分类数,每个通道图像的像素点都有一个概率,表示当前像素点预测为此类的概率 但是记住,原论文中的输入大小为572 * 572 * 1 ,输出为 338 * 338 * 2,为何这样呢? 源于作者,没有做0填充(现代做法是执行卷积前0填充),而是镜像填充,再具体一点,就是将大图划分为patch时,如果 $572 \times 572$ 的输入方框 跨越原图边界,就进行镜像填充。 寻找代码中实际的处理 镜像填充(不常用): 如果你需要填充一个像素: 零填充:| 0 | 5 | 8 | 1 | 4 | 镜像填充:| 8 | 5 | 8 | 1 | 4 |(它将 5 旁边的 8 复制到了 5 的左边,就像 5 是一面镜子反射了 8 一样。) 下面是现代填充和原文填充对比 原始 U-Net 做法 准备数据(Pre-processing): 读取超大图 ($5000 \times 5000$)。 确定要切的一个 Patch 位置。 判断位置是否在边缘。 如果是边缘 $\rightarrow$ 执行镜像填充算法(Mirror Padding)生成扩充数据。 $\leftarrow$ (就是这里!) ...
A Neural Representation of Sketch Drawings 以向量形式,生成连贯的涂鸦(低分辨率的)。 想法 以人的思维方式进行生成,具体是模拟控笔的动作:移动方向,提笔,结束绘画 什么是:unconditional and conditional generation of vector images composed of a sequence of lines. 数据 dataset 为笔画动作,每个点由5个元素表示,分别是偏移和状态,其中偏移是相对于上一个点的偏移,状态则包含:笔尖触纸、抬笔、结束绘画 方法 经过双向RNN 生成h,经过全连接层投影到$ \mu $和 $\sigma$,使用ex使得$\sigma$非负,再进行$z = \mu + \sigma \odot \mathcal{N}(0, I)$,其中$ \sigma \odot \mathcal{N}(0, I)$,是生成一个符合高斯分布的噪声,并使用$\sigma$进行放缩 为何这样做: Encoder 神经网络输出 $\mu$ 和 $\sigma$ 2,实际上是在告诉系统:“我认为这张草图在潜在空间里的位置大概在这里($\mu$),但我不太确定,允许的误差范围大概是这么大($\sigma$)。 z经过tanh ($[ h0 ; c0 ] = \tanh(W_z z + b_z)$)得到初始状态向量h0,c0,其中前者是初始隐藏状态,代表短期记忆或输出状态,后者是初始细胞状态(LSTM 特有的),代表长期记忆初始细胞状态(LSTM 特有的),代表长期记忆 hi的计算方法: 根据 $h_0$(零状态)和 $S_0$ 计算出 $h_1$。 ...
NLP的核心任务:understanding and synthesizing NLP输入预处理 Tokenization Case folding 将输入统一大小写,以减少内存,提高效率 ,but可能创造歧义,so具体问题具体分析 For example "Green" (name) has a different meaning to "green" (colour) but both would get the same token if case folding is applied. Stop word removal 移除一些含义较少的词,同样提高效率,but可能造成语义不完整,具体问题具体分析 Examples include, "a", "the", "of", "an", "this","that".For some tasks like topic modelling (identifying topics in text), contextual information is not as important compared to a task like sentiment analysis where the stop word "not" can change the sentiment completely. ...
1. 理论 输入 embedding words turning each input word into a vector using an embedding algorithm. 问题:The size of this list is hyperparameter we can set – basically it would be the length of the longest sentence in our training dataset. 最底层的编码器输入是 embedding words,其后都是其他编码器的输出 In the bottom encoder that would be the word embeddings, but in other encoders, it would be the output of the encoder that’s directly below BERT实践中也提到了这个,可以查看下 ...