2023-05-01から1ヶ月間の記事一覧

An Attention Free Transformer

概要 Transformerは従来のRNNやCNNと比べて計算量を大幅に減らしたが、まだその計算量は大きいままである。ボトルネックとなっているのは、Attention layerにおける行列積の計算で、テキストサイズの2乗に比例した時間がかかっている。そこで、行列積に近似…

Introduction to Cryptography Chapter 3

Exercise 3.16.1 #include <iostream> using namespace std; int main(){ string input = "VHFUHW"; for(int shift = 0; shift < 26; shift++){ cout << "shift: " << shift << " "; for (char chr : input) cout << char('A' + (chr - 'A' + step) % 26); cout << end</iostream>…