forked from hjptriplebee/Chinese_poem_generator
-
Notifications
You must be signed in to change notification settings - Fork 0
/
config.py
36 lines (28 loc) · 1.02 KB
/
config.py
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
28
29
30
31
32
33
34
35
36
# coding: UTF-8
'''''''''''''''''''''''''''''''''''''''''''''''''''''
file name: config.py
create time: 2017年06月25日 星期日 10时56分55秒
author: Jipeng Huang
e-mail: [email protected]
github: https://github.com/hjptriplebee
'''''''''''''''''''''''''''''''''''''''''''''''''''''
import tensorflow as tf
import numpy as np
import argparse
import os
import random
import time
import collections
batchSize = 64
learningRateBase = 0.001
learningRateDecayStep = 1000
learningRateDecayRate = 0.95
epochNum = 10 # train epoch
generateNum = 5 # number of generated poems per time
type = "poetrySong" # dataset to use, shijing, songci, etc
trainPoems = "./dataset/" + type + "/" + type + ".txt" # training file location
checkpointsPath = "./checkpoints/" + type # checkpoints location
saveStep = 1000 # save model every savestep
# evaluate
trainRatio = 0.8 # train percentage
evaluateCheckpointsPath = "./checkpoints/evaluate"