forked from hnu202409060624/python
parent
a28160dad0
commit
3c9489e9a8
@ -1,21 +0,0 @@
|
|||||||
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())
|
|
Loading…
Reference in new issue