-
Notifications
You must be signed in to change notification settings - Fork 378
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
ESMM模型预估cvr全为0 #16
Comments
请问哪里有数据集,直接可以用的 |
我也遇到这个问题了,目前已解决,方式是:build_mode()函数只返回net,把计算logits的步骤放在my_model()函数里搞, def my_model(features, labels, mode, params):
with tf.variable_scope('ctr_model'):
last_ctr_layer = build_mode(features, mode, params)
with tf.variable_scope('cvr_model'):
last_cvr_layer = build_mode(features, mode, params)
head = head_lib._binary_logistic_or_multi_class_head(
n_classes=2, weight_column=None, label_vocabulary=None,
loss_reduction=losses.Reduction.SUM)
ctr_logits = tf.layers.dense(last_ctr_layer, units=head.logits_dimension,
kernel_initializer=tf.glorot_uniform_initializer())
cvr_logits = tf.layers.dense(last_cvr_layer, units=head.logits_dimension,
kernel_initializer=tf.glorot_uniform_initializer())
ctr_predictions = tf.sigmoid(ctr_logits, name="CTR")
cvr_predictions = tf.sigmoid(cvr_logits, name="CVR")
......... |
我试了一下,CVR 还是 0 |
可能输入里没有 tfrecords 文件。把 train_input_fn 的函数第一句改成 dataset = tf.data.TFRecordDataset(filenames),然后 filename 里包含 tfrecords ,比如”../../cvr_train.tfrecords“ ,cvr 结果就不为 0 |
你有数据集吗? |
我用的自己的数据集 |
其中 head.logits_dimension 在做二分类的情况下 返回的就是 1,效果和
|
hi 请教个问题 ESMM模型预估的ctr看起来正常 但是预估cvr全为0 会是什么原因呢?
The text was updated successfully, but these errors were encountered: