BERT4Rec-VAE-Pytorch icon indicating copy to clipboard operation
BERT4Rec-VAE-Pytorch copied to clipboard

0 index anime

Open MRamazan opened this issue 5 months ago • 0 comments

in dataset/base.py file, this line: smap = {s: i for i, s in enumerate(set(df['sid']))}

should be changed to: smap = {s: i + 1 for i, s in enumerate(set(df['sid']))}

because enumerate starts from 0 and bert model ignores 0. 0 indexed anime will be considered from the padded part of the vector and will be ignored. to avoid that, we should start from index 1.

MRamazan avatar Jun 26 '25 21:06 MRamazan