File size: 510 Bytes
05040c0 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 |
import torch
# GPU device setting
device = torch.device("cuda:0" if torch.cuda.is_available() else "cpu")
# model parameter setting
batch_size =128
max_len = 512 #the default is 256
d_model = 768
n_layers = 6
n_heads = 8
ffn_hidden = 1024
drop_prob = 0.1
max_seq_len = 30
PATH = './msa_nad/unprepro/'
ext = '_data.csv'
# optimizer parameter setting
init_lr = 1e-5
factor = 0.9
adam_eps = 5e-9
patience = 10
warmup = 100
epoch = 200
clip = 1.0
weight_decay = 5e-4
inf = float('inf') |