Skip to content
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][protos]modify esmm,add auc.num_thresholds #76

Merged
merged 8 commits into from Dec 2, 2021

Conversation

poson
Copy link
Collaborator

@poson poson commented Nov 22, 2021

  1. DNN has 0 neuro means just return concated input features
  2. ESMM change loss functions ,avoid the loss of accuracy 。use sqrt to the probs of ctcvr 。
  3. add AUC.num_thresholds
  4. use metric.auc.num_thresholds to access num_thresholds

@CLAassistant
Copy link

CLAassistant commented Nov 22, 2021

CLA assistant check
All committers have signed the CLA.

weights=self._sample_weight)
ctr_loss = tf.reduce_sum(tf.nn.sigmoid_cross_entropy_with_logits(labels=tf.cast(self._labels[ctr_label_name], tf.float32),
logits=self._prediction_dict['logits_%s' % ctr_tower_name]),
name="cvr_loss")
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

cvr_loss => ctr_loss

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

@@ -111,7 +109,7 @@ def build_metric_graph(self, eval_config):
ctr_label_name = self._label_name_dict[ctr_tower_name]
for metric in self._cvr_tower_cfg.metrics_set:
# CTCVR metric
ctcvr_label_name = cvr_label_name + '_ctcvr'
ctcvr_label_name = cvr_label_name + '_ctcvrsqrt'
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

_ctcvrsqrt => _ctcvr

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

@poson poson changed the title modify esmm,add auc.num_thresholds [esmm][proto]modify esmm,add auc.num_thresholds Nov 29, 2021
@poson poson changed the title [esmm][proto]modify esmm,add auc.num_thresholds [esmm][protos]modify esmm,add auc.num_thresholds Nov 29, 2021
self._labels[ctr_label_name],
self._prediction_dict['logits_%s' % ctr_tower_name],
weights=self._sample_weight)
ctr_loss = tf.reduce_sum(tf.nn.sigmoid_cross_entropy_with_logits(labels=tf.cast(self._labels[ctr_label_name], tf.float32),
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

pre-commit run -a

@@ -159,6 +157,8 @@ def _add_to_prediction_dict(self, output):
self._prediction_dict['probs_%s' % self._ctr_tower_cfg.tower_name])
# pctcvr = pctr * pcvr
self._prediction_dict['probs_ctcvr'] = prob
self._prediction_dict['probs_ctcvrsqrt'] = tf.sqrt(prob)

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

drop it

self._prediction_dict['probs_ctcvr'],
weights=self._sample_weight)
ctcvr_label = tf.cast(self._labels[cvr_label_name] * self._labels[ctr_label_name], tf.float32)
cvr_losses = tf.keras.backend.binary_crossentropy(ctcvr_label, self._prediction_dict['probs_ctcvr'])
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

add test

@dawn310826
Copy link
Collaborator

LGTM

@poson poson merged commit 50365e2 into alibaba:master Dec 2, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants