funkeras
Project description
notekeras
attention, transformer, bert 等都是从大神CyberZHG学习来的, 主要是因为想学习源码并进行一些标注,所以进行了一些翻译、标注和整合
yolo 参考 keras-yolo3, keras-yolo3
Attention
ScaledDotProductAttention
$$\text{Attention}(Q, K, V) = \text{softmax}(\frac{Q K^T}{\sqrt{d_k}}) V$$
SeqSelfAttention
multiplicative
$$e_{t, t'} = x_t^T W_a x_{t'} + b_a$$
$$a_{t} = \text{softmax}(e_t)$$
$$l_t = \sum_{t'} a_{t, t'} x_{t'}$$
additive
$$h_{t, t'} = \tanh(x_t^T W_t + x_{t'}^T W_x + b_h)$$
$$e_{t, t'} = W_a h_{t, t'} + b_a$$
$$a_{t} = \text{softmax}(e_t)$$
$$l_t = \sum_{t'} a_{t, t'} x_{t'}$$
SeqWeightedAttention
$$Y = \text{softmax}(XW + b) X$$
MultiHeadAttention
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distributions
No source distribution files available for this release.See tutorial on generating distribution archives.
Built Distribution
funkeras-0.8.12-py3-none-any.whl
(268.2 kB
view details)
File details
Details for the file funkeras-0.8.12-py3-none-any.whl
.
File metadata
- Download URL: funkeras-0.8.12-py3-none-any.whl
- Upload date:
- Size: 268.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.9.16
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | c54638208c6b83c6c859e9c4a557b305b7128d9680f3421e415d468897b6553a |
|
MD5 | 1a71ea4541beb89a1f1f3f4d46027db3 |
|
BLAKE2b-256 | 2b25273be9a84938d46ed1dbac16c138760c982fd0799e35cc83592aa7ffbb0e |