-
Notifications
You must be signed in to change notification settings - Fork 332
/
mind_on_books.config
116 lines (108 loc) · 2.06 KB
/
mind_on_books.config
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
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
train_input_path: "examples/data/amazon_books_data/amazon_train_data"
eval_input_path: "examples/data/amazon_books_data/amazon_test_data"
model_dir: "examples/ckpt/mind_book_ckpt"
train_config {
log_step_count_steps: 100
optimizer_config: {
adam_optimizer: {
learning_rate: {
exponential_decay_learning_rate {
initial_learning_rate: 0.001
decay_steps: 1000
decay_factor: 0.5
min_learning_rate: 0.00001
}
}
}
use_moving_average: false
}
save_checkpoints_steps: 2000
num_steps: 20000
}
eval_config {
metrics_set: {
auc {}
}
}
data_config {
input_fields {
input_name:'user_id'
input_type: STRING
}
input_fields {
input_name:'book_id_seq'
input_type: STRING
}
input_fields {
input_name: 'book_id'
input_type: STRING
}
input_fields {
input_name: 'label'
input_type: INT32
}
label_fields: 'label'
batch_size: 4096
num_epochs: 2
prefetch_size: 32
input_type: CSVInput
separator: "\t"
}
feature_config: {
features: {
input_names: 'user_id'
feature_type: IdFeature
embedding_dim: 16
hash_bucket_size: 500000
}
features: {
input_names: 'book_id'
feature_type: IdFeature
embedding_dim: 16
hash_bucket_size: 400000
}
features: {
input_names: 'book_id_seq'
feature_type: SequenceFeature
separator: '|'
hash_bucket_size: 400000
embedding_dim: 16
}
}
model_config:{
model_class: "MIND"
feature_groups: {
group_name: 'hist'
feature_names: 'book_id_seq'
}
feature_groups: {
group_name: 'user'
feature_names: 'user_id'
wide_deep:DEEP
}
feature_groups: {
group_name: "item"
feature_names: 'book_id'
wide_deep:DEEP
}
mind {
user_dnn {
hidden_units: [128, 64, 32]
}
item_dnn {
hidden_units: [128, 64, 32]
}
concat_dnn {
hidden_units: [64, 32]
}
capsule_config {
max_k: 3
max_seq_len: 50
high_dim: 64
}
l2_regularization: 1e-6
}
embedding_regularization: 5e-5
}
export_config {
}