Skip to content

Commit

Permalink
training log for KGAT-3 on Amazon-Book dataset
Browse files Browse the repository at this point in the history
training log for KGAT-3 (with three attentive embedding propagation layers) on Amazon-Book dataset
  • Loading branch information
xiangwang1223 authored Nov 2, 2019
1 parent 432bb1c commit 6eb71fc
Showing 1 changed file with 74 additions and 0 deletions.
74 changes: 74 additions & 0 deletions Log/training_log_amazon-book.log
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
KGAT: dataset=amazon-book, lr=0.0001, regs=[1e-5,1e-5], node_dropout=[0.1], mess_dropout=[0.1]
[n_users, n_items]=[70679, 24915]
[n_train, n_test]=[652514, 193920]
[n_entities, n_relations, n_triples]=[113487, 39, 2557746]
[batch_size, batch_size_kg]=[1024, 4015]
convert ratings into adj mat done.
convert 80 relational triples into adj mat done. @1.5871s
generate si-normalized adjacency matrix.
reordering indices...
reorganize all kg data done.
sort meta-data done.
sort all data done.
load the pretrained bprmf model parameters.
using pretrained initialization
#params: 12146384
without pretraining.
Epoch 0 [322.8s]: train==[434.85162=14.30064 + 420.17328 + 0.37876]
Epoch 9 [305.4s + 92.5s]: train==[24.35039=9.99989 + 13.37466 + 0.97583], recall=[0.13895, 0.30366], precision=[0.01453, 0.00699], hit=[0.23908, 0.47029], ndcg=[0.09586, 0.14911]
save the weights in path: weights/amazon-book/kgat_si_sum_bi_l3/64-32-16/l0.0001_r1e-05-1e-05
Epoch 19 [309.6s + 89.4s]: train==[15.04446=8.35125 + 5.66788 + 1.02533], recall=[0.14370, 0.31000], precision=[0.01499, 0.00714], hit=[0.24673, 0.47744], ndcg=[0.09814, 0.15197]
save the weights in path: weights/amazon-book/kgat_si_sum_bi_l3/64-32-16/l0.0001_r1e-05-1e-05
Epoch 29 [310.7s + 87.0s]: train==[11.97192=7.29322 + 3.65631 + 1.02240], recall=[0.14630, 0.31336], precision=[0.01530, 0.00722], hit=[0.25085, 0.48122], ndcg=[0.09966, 0.15357]
save the weights in path: weights/amazon-book/kgat_si_sum_bi_l3/64-32-16/l0.0001_r1e-05-1e-05
Epoch 39 [306.7s + 89.0s]: train==[10.38838=6.59963 + 2.78626 + 1.00252], recall=[0.14556, 0.31349], precision=[0.01518, 0.00722], hit=[0.24982, 0.48155], ndcg=[0.09870, 0.15293]
Epoch 49 [309.1s + 86.4s]: train==[9.32441=6.05954 + 2.28278 + 0.98207], recall=[0.14746, 0.31572], precision=[0.01540, 0.00727], hit=[0.25318, 0.48411], ndcg=[0.09995, 0.15420]
save the weights in path: weights/amazon-book/kgat_si_sum_bi_l3/64-32-16/l0.0001_r1e-05-1e-05
Epoch 50 [312.0s]: train==[9.35165=6.07337 + 2.29877 + 0.97950]
Epoch 59 [309.7s + 86.4s]: train==[8.60173=5.62771 + 2.00795 + 0.96606], recall=[0.14782, 0.31582], precision=[0.01536, 0.00727], hit=[0.25326, 0.48356], ndcg=[0.09977, 0.15396]
save the weights in path: weights/amazon-book/kgat_si_sum_bi_l3/64-32-16/l0.0001_r1e-05-1e-05
Epoch 69 [306.5s + 87.2s]: train==[8.16859=5.43472 + 1.77658 + 0.95728], recall=[0.14803, 0.31633], precision=[0.01542, 0.00730], hit=[0.25373, 0.48448], ndcg=[0.09985, 0.15425]
save the weights in path: weights/amazon-book/kgat_si_sum_bi_l3/64-32-16/l0.0001_r1e-05-1e-05
Epoch 79 [308.0s + 86.0s]: train==[7.90719=5.33418 + 1.62499 + 0.94802], recall=[0.14862, 0.31721], precision=[0.01546, 0.00732], hit=[0.25488, 0.48523], ndcg=[0.10030, 0.15472]
save the weights in path: weights/amazon-book/kgat_si_sum_bi_l3/64-32-16/l0.0001_r1e-05-1e-05
Epoch 89 [311.5s + 89.2s]: train==[7.56361=5.08096 + 1.54154 + 0.94111], recall=[0.14857, 0.31712], precision=[0.01549, 0.00730], hit=[0.25479, 0.48508], ndcg=[0.10020, 0.15459]
Epoch 99 [310.0s + 87.7s]: train==[7.14868=4.81877 + 1.39478 + 0.93513], recall=[0.14910, 0.31646], precision=[0.01555, 0.00730], hit=[0.25585, 0.48440], ndcg=[0.10082, 0.15487]
save the weights in path: weights/amazon-book/kgat_si_sum_bi_l3/64-32-16/l0.0001_r1e-05-1e-05
Epoch 100 [308.7s]: train==[7.15196=4.79659 + 1.42010 + 0.93527]
Epoch 109 [309.8s + 88.0s]: train==[6.82737=4.58080 + 1.31501 + 0.93157], recall=[0.14872, 0.31623], precision=[0.01550, 0.00730], hit=[0.25485, 0.48530], ndcg=[0.10058, 0.15485]
Epoch 119 [309.0s + 90.9s]: train==[6.78630=4.59566 + 1.26268 + 0.92795], recall=[0.14839, 0.31658], precision=[0.01545, 0.00729], hit=[0.25475, 0.48617], ndcg=[0.10041, 0.15493]
Epoch 129 [309.6s + 89.7s]: train==[6.50196=4.37541 + 1.20284 + 0.92370], recall=[0.14923, 0.31688], precision=[0.01553, 0.00731], hit=[0.25588, 0.48635], ndcg=[0.10111, 0.15542]
save the weights in path: weights/amazon-book/kgat_si_sum_bi_l3/64-32-16/l0.0001_r1e-05-1e-05
Epoch 139 [309.5s + 92.8s]: train==[6.45537=4.36299 + 1.17223 + 0.92015], recall=[0.14877, 0.31591], precision=[0.01546, 0.00727], hit=[0.25530, 0.48536], ndcg=[0.10116, 0.15533]
Epoch 149 [308.7s + 90.3s]: train==[6.26348=4.20540 + 1.14015 + 0.91793], recall=[0.14901, 0.31662], precision=[0.01551, 0.00729], hit=[0.25617, 0.48556], ndcg=[0.10080, 0.15503]
Epoch 150 [309.0s]: train==[6.26841=4.21381 + 1.13699 + 0.91760]
Epoch 159 [311.0s + 99.3s]: train==[6.12620=4.12069 + 1.09121 + 0.91431], recall=[0.14848, 0.31708], precision=[0.01544, 0.00729], hit=[0.25478, 0.48655], ndcg=[0.10065, 0.15526]
Epoch 169 [309.4s + 90.6s]: train==[5.97006=4.00595 + 1.05198 + 0.91212], recall=[0.14887, 0.31572], precision=[0.01548, 0.00726], hit=[0.25550, 0.48525], ndcg=[0.10130, 0.15539]
Epoch 179 [308.4s + 91.6s]: train==[5.93250=3.96599 + 1.05499 + 0.91152], recall=[0.14887, 0.31517], precision=[0.01547, 0.00724], hit=[0.25567, 0.48486], ndcg=[0.10120, 0.15518]
Epoch 189 [306.8s + 91.1s]: train==[5.82507=3.94174 + 0.97392 + 0.90941], recall=[0.14905, 0.31589], precision=[0.01549, 0.00725], hit=[0.25608, 0.48550], ndcg=[0.10104, 0.15508]
Epoch 199 [386.6s + 148.3s]: train==[5.73585=3.80720 + 1.01967 + 0.90899], recall=[0.14897, 0.31547], precision=[0.01546, 0.00724], hit=[0.25546, 0.48552], ndcg=[0.10087, 0.15504]
Epoch 200 [388.7s]: train==[5.68087=3.76723 + 1.00487 + 0.90876]
Epoch 209 [418.2s + 161.0s]: train==[5.62682=3.73299 + 0.98617 + 0.90765], recall=[0.14996, 0.31526], precision=[0.01555, 0.00725], hit=[0.25706, 0.48523], ndcg=[0.10110, 0.15493]
save the weights in path: weights/amazon-book/kgat_si_sum_bi_l3/64-32-16/l0.0001_r1e-05-1e-05
Epoch 219 [393.2s + 141.8s]: train==[5.53078=3.65310 + 0.97136 + 0.90632], recall=[0.14888, 0.31495], precision=[0.01544, 0.00723], hit=[0.25547, 0.48499], ndcg=[0.10082, 0.15486]
Epoch 229 [389.6s + 140.7s]: train==[5.42612=3.60250 + 0.91661 + 0.90701], recall=[0.14937, 0.31509], precision=[0.01548, 0.00723], hit=[0.25629, 0.48421], ndcg=[0.10126, 0.15502]
Epoch 239 [397.8s + 159.2s]: train==[5.36261=3.55542 + 0.90213 + 0.90506], recall=[0.14985, 0.31511], precision=[0.01550, 0.00722], hit=[0.25600, 0.48465], ndcg=[0.10148, 0.15524]
Epoch 249 [382.6s + 145.9s]: train==[5.33600=3.56271 + 0.86919 + 0.90408], recall=[0.15004, 0.31577], precision=[0.01554, 0.00723], hit=[0.25694, 0.48537], ndcg=[0.10172, 0.15547]
save the weights in path: weights/amazon-book/kgat_si_sum_bi_l3/64-32-16/l0.0001_r1e-05-1e-05
Epoch 250 [391.4s]: train==[5.26561=3.44393 + 0.91696 + 0.90472]
Epoch 259 [392.7s + 154.0s]: train==[5.18826=3.41418 + 0.86969 + 0.90439], recall=[0.15026, 0.31535], precision=[0.01555, 0.00723], hit=[0.25676, 0.48529], ndcg=[0.10160, 0.15540]
save the weights in path: weights/amazon-book/kgat_si_sum_bi_l3/64-32-16/l0.0001_r1e-05-1e-05
Epoch 269 [387.3s + 99.7s]: train==[5.11109=3.35818 + 0.85011 + 0.90280], recall=[0.15015, 0.31567], precision=[0.01556, 0.00723], hit=[0.25692, 0.48577], ndcg=[0.10188, 0.15570]
Epoch 279 [305.3s + 96.3s]: train==[5.05070=3.32123 + 0.82708 + 0.90239], recall=[0.15025, 0.31623], precision=[0.01557, 0.00724], hit=[0.25726, 0.48573], ndcg=[0.10178, 0.15563]
Epoch 289 [345.1s + 101.0s]: train==[5.00337=3.29391 + 0.80647 + 0.90300], recall=[0.15020, 0.31557], precision=[0.01551, 0.00723], hit=[0.25685, 0.48519], ndcg=[0.10187, 0.15569]
Epoch 299 [354.8s + 99.3s]: train==[4.92237=3.19177 + 0.82832 + 0.90228], recall=[0.15022, 0.31556], precision=[0.01555, 0.00723], hit=[0.25680, 0.48527], ndcg=[0.10194, 0.15570]
Epoch 300 [309.9s]: train==[5.02486=3.28674 + 0.83598 + 0.90214]
Epoch 309 [348.3s + 106.4s]: train==[4.90299=3.17177 + 0.82934 + 0.90188], recall=[0.14934, 0.31612], precision=[0.01545, 0.00724], hit=[0.25561, 0.48603], ndcg=[0.10151, 0.15567]
Epoch 319 [306.7s + 106.0s]: train==[4.86037=3.11336 + 0.84706 + 0.89995], recall=[0.14997, 0.31540], precision=[0.01552, 0.00722], hit=[0.25635, 0.48518], ndcg=[0.10152, 0.15530]
Epoch 329 [307.2s + 104.0s]: train==[4.88717=3.18126 + 0.80609 + 0.89982], recall=[0.15018, 0.31640], precision=[0.01555, 0.00724], hit=[0.25703, 0.48655], ndcg=[0.10192, 0.15584]
Epoch 339 [308.0s + 100.6s]: train==[4.82424=3.12098 + 0.80548 + 0.89777], recall=[0.14951, 0.31562], precision=[0.01546, 0.00722], hit=[0.25619, 0.48587], ndcg=[0.10140, 0.15538]
Epoch 349 [307.5s + 100.2s]: train==[4.67877=3.02359 + 0.76005 + 0.89513], recall=[0.14967, 0.31549], precision=[0.01548, 0.00722], hit=[0.25652, 0.48535], ndcg=[0.10140, 0.15520]
Epoch 350 [356.4s]: train==[4.68890=3.02420 + 0.76996 + 0.89474]
Epoch 359 [306.4s + 100.7s]: train==[4.65316=2.98167 + 0.77672 + 0.89477], recall=[0.14964, 0.31555], precision=[0.01550, 0.00722], hit=[0.25680, 0.48502], ndcg=[0.10166, 0.15548]
Early stopping is trigger at step: 10 log:0.14963518842334994
Best Iter=[25]@[123463.0] recall=[0.15026 0.21178 0.25415 0.28778 0.31535], precision=[0.01555 0.01144 0.00939 0.00813 0.00723], hit=[0.25676 0.35057 0.40804 0.45136 0.48529], ndcg=[0.10160 0.12346 0.13700 0.14725 0.15540]

5 comments on commit 6eb71fc

@rongpei-zcl
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

self.u_e = tf.nn.embedding_lookup(self.ua_embeddings, self.users)
AttributeError: 'KGAT' object has no attribute 'ua_embeddings'
请问这个问题怎么解决啊

@xiangwang1223
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

请问你设置程序运行的代码是什么呢?

@rongpei-zcl
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

运行的代码是Main.py。这个变量已经在函数里面定义的,不知道为什么会报错。这段代码如下:
def _build_model_phase_I(self):
if self.alg_type in ['bi']:
self.ua_embeddings, self.ea_embeddings = self._create_bi_interaction_embed()
elif self.alg_type in ['gcn']:
self.ua_embeddings, self.ea_embeddings = self._create_gcn_embed()
elif self.alg_type in ['graphsage']:
self.ua_embeddings, self.ea_embeddings = self._create_graphsage_embed()
self.u_e = tf.nn.embedding_lookup(self.ua_embeddings, self.users)
self.pos_i_e = tf.nn.embedding_lookup(self.ea_embeddings, self.pos_items)
self.neg_i_e = tf.nn.embedding_lookup(self.ea_embeddings, self.neg_items)

@xiangwang1223
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think that there is no configuration about the running model. Please run the command that I list in READ.me like:
python Main.py --model_type kgat --alg_type bi --dataset yelp2018 --regs [1e-5,1e-5] --layer_size [64,32,16] --embed_size 64 --lr 0.0001 --epoch 1000 --verbose 50 --save_flag 1 --pretrain -1 --batch_size 1024 --node_dropout [0.1] --mess_dropout [0.1,0.1,0.1] --use_att True --use_kge True

@rongpei-zcl
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's ok,thank you!

Please sign in to comment.