shenweichen / DeepCTR-Torch

【PyTorch】Easy-to-use,Modular and Extendible package of deep-learning based CTR models.
https://deepctr-torch.readthedocs.io/en/latest/index.html
Apache License 2.0
2.95k stars 696 forks source link

IndexError: index out of range in self #295

Open zoey-zy998 opened 3 months ago

zoey-zy998 commented 3 months ago

image

用了一批新数据,去测试就报错,用原先训练的数据测试没问题

FuatOgme commented 3 months ago

I got the same error, thank you for rising this issue.

hanxu49 commented 1 month ago

可以检查SparseFeat列的最大索引值在训练数据和测试数据中是否一致,可能出现在训练数据中最大索引值为100,但在测试数据中同一列数据的最大索引值为105的情况,这个时候就会报错。以下是我的出错示例: image