erniesage_node_classfication.yaml 1.2 KB
Newer Older
W
weiyue.su 已提交
1 2 3
# Global Enviroment Settings 
#
# trainer config ------
4
task: "node_classification"
W
weiyue.su 已提交
5 6 7 8 9
learner_type: "gpu"
optimizer_type: "adam"
lr: 0.00005
batch_size: 32
CPU_NUM: 10
10
epoch: 3
W
weiyue.su 已提交
11
log_per_step: 1
S
suweiyue 已提交
12
save_per_step: 1000
W
weiyue.su 已提交
13 14 15 16
output_path: "./output"
ckpt_path: "./ernie_base_ckpt"

# data config ------
17 18
graph_data: "./example_data/node_classification/graph_data.txt"
train_data: "./example_data/node_classification/train_data.txt"
S
suweiyue 已提交
19 20

graph_work_path: "./workdir"
W
weiyue.su 已提交
21 22 23 24 25
sample_workers: 1
use_pyreader: true
input_type: "text"

# model config ------
26
num_label: 10
W
weiyue.su 已提交
27
samples: [10]
28
model_type: "ERNIESageV2"
W
weiyue.su 已提交
29 30 31 32 33 34 35 36
layer_type: "graphsage_sum"

max_seqlen: 40

num_layers: 1
hidden_size: 128
final_fc: true
final_l2_norm: true
37
loss_type: "softmax_with_cross_entropy"
S
suweiyue 已提交
38 39
margin: 0.1
neg_type: "batch_neg"
W
weiyue.su 已提交
40 41 42 43 44 45 46 47 48 49 50 51

# infer config ------
infer_model: "./output/last"
infer_batch_size: 128

# ernie config ------
encoding: "utf8"
ernie_vocab_file: "./vocab.txt"
ernie_config:
    attention_probs_dropout_prob: 0.1
    hidden_act: "relu"
    hidden_dropout_prob: 0.1
52
    hidden_size: 768
W
weiyue.su 已提交
53 54
    initializer_range: 0.02
    max_position_embeddings: 513
55 56
    num_attention_heads: 12
    num_hidden_layers: 12
W
weiyue.su 已提交
57 58 59 60 61
    sent_type_vocab_size: 4
    task_type_vocab_size: 3
    vocab_size: 18000
    use_task_id: false
    use_fp16: false