GithubHelp home page GithubHelp logo

bbruceyuan / deepmatch-torch Goto Github PK

View Code? Open in Web Editor NEW
74.0 74.0 9.0 115 KB

「PyTorch」A deep matching model library for recommendations & advertising. It's easy to train models and to export representation vectors which can be used for ANN search.

License: MIT License

Python 99.78% Shell 0.22%
deepmatch dssm-pytorch mind-pytorch youtubednn-pytorch

deepmatch-torch's Introduction

Hi there 👋

来了解我吧~

deepmatch-torch's People

Contributors

bbruceyuan avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

deepmatch-torch's Issues

关于mind代码中对用户行为的pooling操作

Discussed in #4

Originally posted by xbingsun May 25, 2022
您好,我在mind实现代码中看到调用 input_from_feature_columns 函数得到用户的历史行为的表示,而在该函数中使用了get_varlen_pooling_list对用户的行为进行了pooling操作,想要请问这样做的原因是什么呢?好像原版本的deepmatch中也使用了这个操作,根据原论文胶囊层输入应该是各个items的embeddings(如下图)。
image

error: ModuleNotFoundError: No module named 'tensorflow.python.keras.preprocessing'

我的电脑是 mac book pro
python=3.7
deepctr-torch=0.2.2
tensorflow-macos 2.8.0

我在 DeepMatch-Torch 的示例里运行了 run_fm_dssm.py 但是没有成功,报错了。
Traceback (most recent call last): File "/Users/henry/PycharmProjects/github/DeepMatch-Torch/examples/run_fm_dssm.py", line 8, in <module> from preprocess import gen_data_set, gen_model_input File "/Users/henry/PycharmProjects/github/DeepMatch-Torch/examples/preprocess.py", line 4, in <module> from tensorflow.python.keras.preprocessing.sequence import pad_sequences ModuleNotFoundError: No module named 'tensorflow.python.keras.preprocessing' WARNING:root: DeepCTR-PyTorch version 0.2.7 detected. Your version is 0.2.2. Use pip install -U deepctr-torch to upgrade.Changelog: https://github.com/shenweichen/DeepCTR-Torch/releases/tag/v0.2.7

提示让我安装 deepctr=0.2.7, 但是好像依赖于 TensorFlow ,安装不上
(py38) henry@hzMacBookPro DeepMatch-Torch % pip3 install deepctr-torch==0.2.7 Looking in indexes: http://mirrors.aliyun.com/pypi/simple/ Collecting deepctr-torch==0.2.7 Using cached http://mirrors.aliyun.com/pypi/packages/d2/17/f392dfbaefdd6371335995c4f84cf3b5166cf907fdfa0aa4edc380fdfc5b/deepctr_torch-0.2.7-py3-none-any.whl (70 kB) Requirement already satisfied: torch>=1.1.0 in /Users/henry/miniforge3/envs/py38/lib/python3.8/site-packages (from deepctr-torch==0.2.7) (1.11.0) ERROR: Could not find a version that satisfies the requirement tensorflow (from deepctr-torch) (from versions: none) ERROR: No matching distribution found for tensorflow
想请问一下该如何解决。

Two Bugs regarding YoutubeDNN

There are two bugs related to the codes for YoutubeDNN model.

  1. The gen_data_set_youteube has a typo... should be youtube. (Not necessarily a bug lol)

  2. Here's the first bug: gen_data_set_youteube will produce the negative samples ONLY, without any positive samples. Consequently all training labels will be 0.

  3. The second one: [neg_list[item_idx] for item_idx in np.random.choice(neg_list, negsample)] is not correct. It should directly call the indexes.

在创建用户特征的时候,生成的历史观影数据长度的声明前后不一致?

在run_youtubednn.py中,SEQ_LEN = 50,但是在创建user_feature_columns这一个变量的时候,声明的历史电影长度为10,这会影响模型的正确运行么?
VarLenSparseFeat(SparseFeat('hist_movie_id', vocabulary_size=feature_max_idx['movie_id'], embedding_dim=embedding_dim, embedding_name="movie_id"), maxlen=10, combiner='mean')

在创建item tower的时候,X维度为(BatchSize,61) (1+1+1+1+1+50+6=61),当取item的id的时候,self.feature_index['movie_id']为[15:21],这会导致不能正确地按照维度取值?
image

关于sampled softmax loss

您好,MIND模型中提到计算loss时候使用了sampled softmax的方法,在deepmatch的代码里我看到有对tf的版本调用,但是在pytorch版本里面好像只传入了sample的个数,但是并没有使用,请问这部分是否会考虑实现?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.