Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/SamLynnEvans/Transformer
/ functions
Functions
48 in github.com/SamLynnEvans/Transformer
⨍
Functions
48
◇
Types & classes
13
↓ 4 callers
Function
yesno
(response)
train.py:118
↓ 3 callers
Function
nopeak_mask
(size, opt)
Batch.py:7
↓ 2 callers
Method
__init__
(self, d_model, eps = 1e-6)
Sublayers.py:8
↓ 2 callers
Method
__init__
(self, vocab_size, d_model, N, heads, dropout)
Models.py:12
↓ 2 callers
Function
create_fields
(opt)
Process.py:25
↓ 2 callers
Function
get_clones
(module, N)
Models.py:8
↓ 2 callers
Function
get_model
(opt, src_vocab, trg_vocab)
Models.py:54
↓ 2 callers
Function
train_model
(model, opt)
train.py:11
↓ 1 callers
Method
__init__
(self, d_model, heads, dropout=0.1)
Layers.py:6
↓ 1 callers
Method
__init__
(self, vocab_size, d_model)
Embed.py:7
↓ 1 callers
Function
attention
(q, k, v, d_k, mask=None, dropout=None)
Sublayers.py:24
↓ 1 callers
Function
beam_search
(src, model, SRC, TRG, opt)
Beam.py:49
↓ 1 callers
Function
create_dataset
(opt, SRC, TRG)
Process.py:52
↓ 1 callers
Function
create_masks
(src, trg, opt)
Batch.py:12
↓ 1 callers
Function
get_len
(train)
Process.py:92
↓ 1 callers
Function
get_synonym
(word, SRC)
translate.py:18
↓ 1 callers
Function
init_vars
(src, model, SRC, TRG, opt)
Beam.py:7
↓ 1 callers
Function
k_best_outputs
(outputs, out, log_scores, i, k)
Beam.py:33
↓ 1 callers
Function
main
()
train.py:67
↓ 1 callers
Function
main
()
translate.py:60
↓ 1 callers
Function
multiple_replace
(dict, text)
translate.py:27
↓ 1 callers
Function
promptNextAction
(model, opt, SRC, TRG)
train.py:125
↓ 1 callers
Function
read_data
(opt)
Process.py:9
↓ 1 callers
Function
translate
(opt, model, SRC, TRG)
translate.py:50
↓ 1 callers
Function
translate_sentence
(sentence, model, opt, SRC, TRG)
translate.py:34
Method
__init__
(self, d_model, heads, dropout=0.1)
Layers.py:25
Method
__init__
(self, optimizer: torch.optim.Optimizer, T_max: int, eta_mi
Optim.py:24
Method
__init__
(self, heads, d_model, dropout = 0.1)
Sublayers.py:41
Method
__init__
(self, d_model, d_ff=2048, dropout = 0.1)
Sublayers.py:80
Method
__init__
(self, d_model, max_seq_len = 200, dropout = 0.1)
Embed.py:15
Method
__init__
(self, lang)
Tokenize.py:6
Method
__init__
(self, vocab_size, d_model, N, heads, dropout)
Models.py:27
Method
__init__
(self, src_vocab, trg_vocab, d_model, N, heads, dropout)
Models.py:42
Function
batch_size_fn
Keep augmenting batch and calculate total number of tokens + padding.
Batch.py:49
Method
create_batches
(self)
Batch.py:30
Method
forward
(self, x, mask)
Layers.py:15
Method
forward
(self, x, e_outputs, src_mask, trg_mask)
Layers.py:39
Method
forward
(self, x)
Sublayers.py:19
Method
forward
(self, q, k, v, mask=None)
Sublayers.py:55
Method
forward
(self, x)
Sublayers.py:88
Method
forward
(self, x)
Embed.py:11
Method
forward
(self, x)
Embed.py:32
Method
forward
(self, src, mask)
Models.py:19
Method
forward
(self, trg, e_outputs, src_mask, trg_mask)
Models.py:34
Method
forward
(self, src, trg, src_mask, trg_mask)
Models.py:47
Method
get_lr
Get updated learning rate.
Optim.py:41
Method
pool
(d, random_shuffler)
Batch.py:32
Method
tokenizer
(self, sentence)
Tokenize.py:9