-
Notifications
You must be signed in to change notification settings - Fork 706
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
新增多任务模型 Dev zsx mtl1 #255
新增多任务模型 Dev zsx mtl1 #255
Conversation
Codecov Report
@@ Coverage Diff @@
## master #255 +/- ##
==========================================
+ Coverage 92.31% 92.58% +0.26%
==========================================
Files 30 35 +5
Lines 2069 2333 +264
==========================================
+ Hits 1910 2160 +250
- Misses 159 173 +14
Flags with carried forward coverage won't be shown. Click here to find out more.
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. |
deepctr_torch/models/dcnmix.py
Outdated
@@ -70,10 +70,9 @@ def __init__(self, linear_feature_columns, | |||
layer_num=cross_num, device=device) | |||
self.add_regularization_weight( | |||
filter(lambda x: 'weight' in x[0] and 'bn' not in x[0], self.dnn.named_parameters()), l2=l2_reg_dnn) | |||
self.add_regularization_weight( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
通过'_list'来判断参数容易引起后续维护迭代出现问题
filter(lambda x: 'weight' in x[0] and 'bn' not in x[0], self.specific_gate_dnn.named_parameters()), | ||
l2=l2_reg_dnn) | ||
else: | ||
self.specific_gate_dnn_final_layer = nn.ModuleList( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if else里的self.specific_gate_dnn_final_layer可进一步合并
|
||
self.out = nn.ModuleList([PredictionLayer(task) for task in task_types]) | ||
|
||
self.add_regularization_weight( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
多个正则权重的添加逻辑可以进行优化
tests/models/multitask/MMOE_test.py
Outdated
'num_experts, expert_dnn_hidden_units, gate_dnn_hidden_units, tower_dnn_hidden_units, task_types, ' | ||
'sparse_feature_num, dense_feature_num', | ||
[ | ||
(3, (256, 128), (64,), (64,), ['binary', 'binary'], 3, 3), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
几个test文件中的 维度可以调小
Getting "RuntimeError: 'lengths' argument should be a 1D CPU int64 tensor, but got 1D cuda:0 Long tensor" #240
DIEN的example在GPU上执行tensor类型出错 #232