DeepMatch icon indicating copy to clipboard operation
DeepMatch copied to clipboard

在MIND里怎样处理多个 item features

Open zhangLongli opened this issue 4 years ago • 3 comments

我想在MIND里添加多个item features。比如movielens里面的movie_id和genres。我是新手,所以尽量基于你的代码改。我现在遇到的问题是,需要给SampledSoftmaxLayer传递所有的item features的embedding。不同的tem feature的embedding的vocabulary_size是不一样的。怎样才能把多个item features的embedding给链接起来呢。

具体是mind.py里面的这段代码。如果item_features是多个的话,怎么办。

item_inputs_list = list(item_features.values())
item_embedding_matrix = embedding_matrix_dict[item_feature_name]
item_index = EmbeddingIndex(list(range(item_vocabulary_size)))(item_features[item_feature_name])
item_embedding_weight = NoMask()(item_embedding_matrix(item_index))
pooling_item_embedding_weight = PoolingLayer()([item_embedding_weight])

output = SampledSoftmaxLayer(num_sampled=num_sampled)(
    inputs=(pooling_item_embedding_weight,user_embedding_final, item_features[item_feature_name]))

万分感谢

zhangLongli avatar May 09 '20 00:05 zhangLongli

同问 Now MIND only support 1 item feature like item_id

Brentbin avatar May 11 '20 11:05 Brentbin

这个我们正在开发中~ 请保持关注!

shenweichen avatar May 16 '20 14:05 shenweichen

这个我们正在开发中~ 请保持关注!

请问这个部分开发完了吗

cl5220418 avatar Nov 22 '20 04:11 cl5220418