fk transformer

transformer transformer是在这篇attention is all you need中提出来的。 上图就是该论文最核心的模型架构图,本文也是围绕着这个架构图来展开的。 embedding 由input embedding和位置编码相加得到,后面的文章详细介绍。 ...

2026-05-08 · 8 分钟 · 3731 字 · Somnus

自注意力,万恶之源(不是)

attention 注意力机制,最早是在机器翻译论文**Neural Machine Translation by Jointly Learning to Align and Translate**中提出来的,他的核心是,用一个东西产生的query,去key/value中查询需要的东西。在上述论文中encoder-decoder attention的结构中。 ...

2026-05-08 · 6 分钟 · 2775 字 · Somnus

Rust学习01-所有权

Trait trait(特征)是一种定义共享行为的机制,可以理解成其他语言中的接口,相当于是不管你底层是什么数据类型,只要定义了这个trait,就一定要实现这个trait的功能。 ...

2026-04-04 · 2 分钟 · 863 字 · Somnus

Eulerproj01

p002 题目 Problem 2: Even Fibonacci numbers 题目链接 Each new term in the Fibonacci sequence is generated by adding the previous two terms. By starting with $1$ and $2$, the first $10$ terms will be: $$1, 2, 3, 5, 8, 13, 21, 34, 55, 89, \dots$$ By considering the terms in the Fibonacci sequence whose values do not exceed four million, find the sum of the even-valued terms. 这道题目的要求是算出Fibonacci数列的前4000000个数字中的偶数之和。 ...

2026-03-29 · 3 分钟 · 1362 字 · Somnus