Transformer
Transformer copied to clipboard
Transformer seq2seq model, program that can build a language translator from parallel corpus
Can the author show the version of pytorch and torchtext. The code cannot run in my env. pytorch 1.13 cuda 11.7 torchtext: 0.14.0 The error message is "ModuleNotFoundError: No module...
I have tried many methods but none of them work successfully. Can you help me?
Does this variable 'k' relates with any other variable when we trained, e.g. 'max_len' variable in test is 'max_strlen' in training.
`Traceback (most recent call last): File "train.py", line 5, in from Process import * File "/Users/pycharm_pro/PyTorch_Learning/Transformer/Process.py", line 5, in from Batch import MyIterator, batch_size_fn File "/Users/pycharm_pro/PyTorch_Learning/Transformer/Batch.py", line 35, in class...
i = vec[0] if sentence_lengths[i]==0: # First end symbol has not been found yet sentence_lengths[i] = vec[1] # Position of first end symbol the above index i should be replaced...
Error
F:\Anaconda\envs\Transformer-master\python.exe E:/Transformer-master/train.py -src_data english.txt -trg_data french.txt -src_lang en -trg_lang fr -epochs 10 loading spacy tokenizers... Traceback (most recent call last): File "E:/Transformer-master/train.py", line 184, in main() File "E:/Transformer-master/train.py", line 96,...
File "E:\Transformer-master\Batch.py", line 26, in create_masks trg_mask = trg_mask & np_mask RuntimeError: Expected all tensors to be on the same device, but found at least two devices, cuda:0 and cpu!...
Hi, In this line: https://github.com/SamLynnEvans/Transformer/blob/37bf49224ccc0ab5a2c8cdb2c330ccd76628e57a/Embed.py#L12 I think you need to multiply the embedding by sqrt(d_model) 
Appriciate for release code, I have a little question is how to set gpu to train the model, when I train the model this error show up, thanks """ The...
RuntimeError: The size of tensor a (207) must match the size of tensor b (200) at non-singleton dimension 1 hat error when I want to up -max_strlen more 80 I...