-
Updated
May 20, 2020 - Python
attention-mechanism
Here are 490 public repositories matching this topic...
-
Updated
Apr 25, 2020 - Python
-
Updated
May 5, 2020 - Python
-
Updated
May 4, 2020
-
Updated
Apr 12, 2020 - Python
assert len(references) == len(hypotheses)
# Calculate BLEU-4 scores
bleu4 = corpus_bleu(references, hypotheses)
-
Updated
Sep 12, 2019 - Python
GPU Memory Benchmark
I did a few training runs of a simple Reformer module with different parameters and logged the GPU memory usage.
Of course, depending on your machine or other things these values can vary, but I thought it might be useful as a visual guide:
dim = 512, seq_len = 256, depth = 1, heads = 1, batch_size = 1: 452 MB
dim = 512, seq_len = 256, depth = 1, heads = 1, batch_size = 8: 992 MB
-
Updated
May 20, 2020 - Python
In official documents, there is a notice 'Each function object is meant to be used only once (in the forward pass).' in subclass of torch.autograd.Function.
In model SpGraphAttentionLayer, you have use the object of SpecialSpmmFunction(self.special_spmm) twice, one for e_rowsum and one for h_prime.
Is it the right usage for subclass of torch.autograd.Function?
-
Updated
Jul 28, 2018 - Jupyter Notebook
-
Updated
Jun 25, 2019 - Python
-
Updated
May 21, 2020
-
Updated
Jul 30, 2019 - Python
Need help for retraining and cross validation and see if the ROUGE score matches exactly (or better) with the numbers reported in the paper.
I just train for 500k iteration (with batch size 8) with pointer generation enabled + coverage loss disabled and next 100k iteration (with batch size 8) with pointer generation enabled + coverage loss enabled.
It would be great if someone can help re-r
-
Updated
May 12, 2020 - Python
-
Updated
Sep 22, 2019 - Python
-
Updated
May 15, 2020
-
Updated
Sep 6, 2019 - Python
-
Updated
Oct 30, 2016 - Jupyter Notebook
-
Updated
Mar 10, 2020 - Python
-
Updated
Nov 25, 2019 - Python
-
Updated
Oct 3, 2017 - Jupyter Notebook
-
Updated
Dec 26, 2017 - Jupyter Notebook
-
Updated
Apr 9, 2020 - Python
-
Updated
Jan 23, 2018 - Python
-
Updated
Apr 16, 2019 - Python
-
Updated
May 1, 2020 - Python
-
Updated
Oct 20, 2018 - Python
Improve this page
Add a description, image, and links to the attention-mechanism topic page so that developers can more easily learn about it.
Add this topic to your repo
To associate your repository with the attention-mechanism topic, visit your repo's landing page and select "manage topics."


I don't understand the conditional sentence in the loop when infer, it is always false。
if tf.reduce_sum(y_hat, 1) == self.token2idx[""]: break