About padding index number
ys201810 opened this issue · 1 comments
ys201810 commented
Hi!!
Thanks for great code!
I have one question about padding at dataloaders/bert.py.
BERT4Rec-VAE-Pytorch/dataloaders/bert.py
Line 112 in f66f253
BERT4Rec-VAE-Pytorch/dataloaders/bert.py
Line 146 in f66f253
At this code, if item length is not enough, then pad using [0].
But I think, index 0 already have a Corresponding itemID, so that is padding using real itemID, right?
Thanks
ys201810 commented
Hi!
Thanks for your message.
Exactly your way is good, or use padding_id is item length + 1. ex)
padding_id = max(item_len) + 1
# If mask_id use max(item_len + 1) then padding_id = max(item_len) + 2
something like that.
I really appreciated your code.
Thanks!!
2023年9月1日(金) 21:49 大锤哥 ***@***.***>:
… hey,friend,though it's 2023 now,the question you propose i think the
itemID start from 1.
like this :
skill_id = [id:i+1 for i,id in enumerate(skill_original)]
Maybe during data preprocessing, when reindexing starts from 1
—
Reply to this email directly, view it on GitHub
<#17 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AKMGYJSBZX5OKLLTDRD23JLXYHKUDANCNFSM5OQ6WBAQ>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>