This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import math | |
import pickle | |
import torch | |
import torch.nn.functional as F | |
def gelu(x): | |
'''Gaussian Error Linear Unit - a smooth version of RELU''' | |
cdf = 0.5 * (1.0 + torch.erf(x / math.sqrt(2.0))) | |
return x * cdf |
This file has been truncated, but you can view the full file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
INFO - 01/02/19 16:25:57 - 0:00:00 - ============ Initialized logger ============ | |
INFO - 01/02/19 16:25:57 - 0:00:00 - attention: True | |
attention_dropout: 0 | |
back_dataset: {} | |
back_directions: [] | |
batch_size: 32 | |
beam_size: 0 | |
clip_grad_norm: 5 | |
command: python main.py --n_enc_layers '5' --n_dec_layers '5' --share_lang_emb 'true' --share_output_emb 'true' --share_enc '5' --share_dec '5' --word_shuffle '3' --word_dropout '0.1' --word_blank '0.1' --langs 'de,en' --mono_dataset 'en:./data2/mono/all.en.tok.60000.pth,,;de:./data2/mono/all.de.tok.60000.pth,,' --para_dataset 'de-en:,./data2/para/dev/newstest2015-deen-src.XX.60000.pth,./data2/para/dev/newstest2016-deen-src.XX.60000.pth' --n_mono '-1' --mono_directions 'en,de' --pivo_directions 'de-en-de,en-de-en' --otf_ |