Skip to content

Latest commit

 

History

History
33 lines (22 loc) · 1.05 KB

README.md

File metadata and controls

33 lines (22 loc) · 1.05 KB

BERT4RS

1. 使用Movies_and_TV进行预训练:

Dataset #users #items avg_action/user avg_action/item #action
Movies_and_TV 123960 50052 8.7 21.7 1084572

将数据集按1:1划分为pretrain和test,每部分包括0.5M action,pretrain用于BERT预训练,test用于fine-tune

使用bert预训练

预训练结果:

INFO:tensorflow:***** Eval results *****
INFO:tensorflow:  global_step = 500000
INFO:tensorflow:  loss = 1.1401069
INFO:tensorflow:  masked_lm_accuracy = 0.7652841
INFO:tensorflow:  masked_lm_loss = 1.1527702
INFO:tensorflow:  next_sentence_accuracy = 1.0
INFO:tensorflow:  next_sentence_loss = 3.410484e-05

2. Fine-tune

预训练模型下载,放在data/Movies_and_TV_5

SeqRec为代码目录,执行python bert_main.py

执行tensorboard logdir=./log查看结果