make sure the extension is installed and loaded make sure gcc and gdb are installed ctrl + shift + B to open command panel, select C++: generate compilation task
this article is a note of: https://blog.paperspace.com/pytorch-hooks-gradient-clipping-debugging/. You should check this original article for more details. import torch import…
省流 pytorch内置一个名为autograd的engine, 负责隐式执行所有梯度计算工作. 在计算图的根部call backwark(), DAG(directed acyclic graph)会计算图中每一个叶子节点的grad并累加到名为grad的属性上, 期间引用链式法则 DAGs are dynamic in PyTorch An im…
参考notebook: https://github.com/chunhuizhang/llm_aigc/blob/main/tutorials/nn_basics/einsum_numpy_torch.ipynb
Pandas 作为金融数据分析工具而开发, 可以轻松解决数据预处理问题. pandas可以进行统计特征的计算, 包括均值 方差 分位数 相关系数 和 协方差 mean() std() cov() # 用于计算样本数据的协方差矩阵 car() describe() # 用于描述样本数据的基本情况 series and dataframe series…
参考视频:[论文速览]Denoising Diffusion Probabilistic Models / DDPM[2006.11239] 在线原理展示:click here 简明数学原理 正向过程: 添加噪声 小e代表重N(0, 1)中采样得到的高斯噪声, x代表某一timestep的图像. 为什么要添加根号? 因为添加了根号可以在后面的推到中…
You Want a neural network to learn what a sprite is: fine details general outlines everything in between add different noise levels to the training data of sprites, to emphasi…
相同点: 机制:两者都使用了点积注意力机制(scaled dot-product attention)来计算注意力权重。 参数:无论是自注意力还是交叉注意力,它们都有查询(Query)、键(Key)和值(Value)的概念。 计算:两者都使用查询和键之间的点积,然后应用softmax函数来计算注意力权重。 输出:在计算完注意力权重后,两者都将这些权…
https://arxiv.org/pdf/2304.06720.pdf https://rich-text-to-image.github.io/ Demostration Motivation 问题:如何使用rich text? 先前的解决方案:直接将rich-text翻译为更长的plain text → 生成图片效果很差 Method 我们的…
已经决定要参加今年的数模比赛了 time table: 2月 -> 美赛 5月 -> 华中杯 9月 -> 国赛 要用一年的时间从小白到拿个果酱的水平. 本post用来记录一些python数学建模的笔记, 之后可能会针对matlab单独再开一个post, 谨以此作为记录. Tips 在pytorch中, 以下划线结尾的函数代表在原位…