当前位置:网站首页>Recommended system - an embedded learning framework for numerical features in CTR prediction
Recommended system - an embedded learning framework for numerical features in CTR prediction
2022-07-25 23:16:00 【Programmers who only know git clone】
Preface
The paper :https://arxiv.org/pdf/2012.08986.pdf
Included :KDD‘21
Institutions : Huawei
Interpretation of the thesis
This brother writes really well , Click here : You know
Code
The code link of the paper hangs and the source code I saw is Huawei mindxxx What deep learning framework is written , Moreover, it is not aligned with the formula in the paper … I'll just use it for the paper pytorch Wrote a
import torch
import torch.nn as nn
class AudisEconder(nn.Module):
r"""Args: in_dim: the dimension of input tensor out_dim: the dimension of output tensor H_j: the number of Meta_embeddings alpha: the factor of skip-connection t: Temperature Coefficient """
def __init__(self, in_dim, out_dim, H_j=20, alpha=0.1, t=1e-5):
super(AudisEconder, self).__init__()
self.in_dim = in_dim
self.out_dim = out_dim
self.w_j = nn.Linear(in_dim, H_j)
self.leak_relu = nn.LeakyReLU()
self.W_j = nn.Linear(H_j, H_j)
self.alpha = alpha
self.t = t
self.softmax = nn.Softmax(dim=-1)
self.ME = nn.Parameter(torch.randn(H_j, out_dim))
def forward(self, x):
h_j = self.leak_relu(self.w_j(x))
x_hat_j = self.W_j(h_j) + self.alpha * h_j
x_hat_j_h = self.softmax(x_hat_j / self.t)
e_j = x_hat_j_h @ self.ME
return e_j
if __name__ == '__main__':
input = torch.rand(16, 10)
model = AudisEconder(in_dim=10, out_dim=128)
out = model(input)
print(out.shape)
边栏推荐
- File contains vulnerability
- How to obtain the cash flow data of advertising services to help analyze the advertising effect?
- Design of regular expressions
- WordPress function encyclopedia, you can do the theme after learning it
- Single model common sense reasoning first surpasses human beings! HFL summit openbookqa challenge
- Simulink learning notes (III) - Simulink automatic code generation (II) "suggestions collection"
- 【接口性能优化】索引失效的原因以及如何进行SQL优化
- HJ9 提取不重复的整数
- 向下扎根,向上生长,探寻华为云AI的“根”力量
- 5 ROS仿真建模(3- rviz+gazebo+控制仿真机器人)
猜你喜欢
![[interface performance optimization] reasons for index failure and how to optimize SQL](/img/b9/64058c823c4497ac36bfb62a101816.jpg)
[interface performance optimization] reasons for index failure and how to optimize SQL

Expression of directional signal -- complex exponential signal

Tips for using (1)

@Import

5 ROS仿真建模(3- rviz+gazebo+控制仿真机器人)

Longitude and latitude and its transformation with coordinate system

npm+模块加载机制

5 ROS simulation modeling (3-rviz+gazebo+ control simulation robot)

Basic knowledge of radar

Network Security Learning (XIV) IP protocol
随机推荐
Longitude and latitude and its transformation with coordinate system
2021-09-30
What has Amazon cloud technology done right to become the leader of cloud AI services for three consecutive years?
ETL工具(数据同步) 二
WebMvcConfigurationSupport
关于优先队列
AI首席架构师12-AICA-工业生产过程优化场景下产业落地解析
The new UI people help task help PHP source code with a value of 1500 / reward task Tiktok Kwai headline like source code / with three-level distribution can be packaged applet
Redis expiration key deletion strategy [easy to understand]
Recommend short videos every week: more and more smart devices need collaboration, posing a greater challenge to the development of the Internet of things?
Basic knowledge of radar
Notification(状态栏通知)详解
MVVM model
Secure code warrior learning record (III)
Learning notes of technical art hundred people plan (1) -- basic rendering pipeline
ZCMU--5015: 完成任务
asp日期函数(磁盘函数不正确怎么办)
Design of Butterworth filter and drawing of amplitude frequency characteristic curve
Several commonly used traversal methods
Tencent map API request source is not authorized, this request source domain name