DeepCTR icon indicating copy to clipboard operation
DeepCTR copied to clipboard

sparsefeat densefeat 线上预测使用时需不需要处理这一步?

Open zaibian opened this issue 3 years ago • 2 comments

示例中没见到过上线部署的demo案例,看到训练时都需要运行sparsefeat densefeat等特征。请问如果我线上预测的话,特征还需要写同样的代码进行处理么?还是不用管这个特征处理?

zaibian avatar May 29 '22 15:05 zaibian

线上预测的时候特征和离线时的model_input保持一致

shenweichen avatar May 31 '22 12:05 shenweichen

比如离线和在线时都用这个特征处理方式,sparse_feature_columns = [SparseFeat(feat, vocabulary_size=self.df[feat].max()+1, embedding_dim=4) for i, feat in enumerate(self.sparse_feature)],里面的参数不会变吗。例如,vocabulary_size不是随着数据集取值改变的吗?

kristen1110 avatar Sep 01 '22 10:09 kristen1110