1
0

update for change of exp2 and add exp3

This commit is contained in:
2025-11-30 16:24:32 +08:00
parent af890d899e
commit 48fcdfcc80
17 changed files with 859 additions and 124 deletions

19
exp3/source/settings.py Normal file
View File

@@ -0,0 +1,19 @@
#ANLI College of Artificial Intelligence
# 禁用词,包含如下字符的唐诗将被忽略
DISALLOWED_WORDS = ['', '', '(', ')', '__', '', '', '', '', '[', ']']
# 句子最大长度
MAX_LEN = 64
# 最小词频
MIN_WORD_FREQUENCY = 8
# 训练的batch size
BATCH_SIZE = 16
# 数据集路径
DATASET_PATH = './poetry.txt'
# 每个epoch训练完成后随机生成SHOW_NUM首古诗作为展示
SHOW_NUM = 5
# 共训练多少个epoch
TRAIN_EPOCHS = 10
# 最佳权重保存路径
BEST_MODEL_PATH = './best_model.h5'