From 0853af9be1636852c3745b481e17026ed4acc9c1 Mon Sep 17 00:00:00 2001 From: hnu202409060624 <2804411502@qq.com> Date: Mon, 30 Dec 2024 18:25:45 +0800 Subject: [PATCH] ADD file via upload --- config.py | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 config.py diff --git a/config.py b/config.py new file mode 100644 index 0000000..32b57d1 --- /dev/null +++ b/config.py @@ -0,0 +1,21 @@ +import json + +import torch + +with open('vocab/vocabulary.json', 'r', encoding='utf-8') as f: + vocab = json.load(f) + vocab_size = len(vocab) +batch_size=1 +input_dim=1024 +embedding_dim=input_dim +dropout=0.1 +n_head=32 +Encoder_n_layers=1 +d_ff1=input_dim*4 +d_ff2=input_dim*4 +Decoder_n_layer=0 +hidden_dim=input_dim +seq_len=30 +bias=True +device=torch.device('cuda') +print(torch.cuda.is_available()) \ No newline at end of file