Skip to content

Commit

Permalink
Merge branch 'master' into feature/dat
Browse files Browse the repository at this point in the history
  • Loading branch information
eric-gecheng committed Nov 14, 2024
2 parents 2a02ede + 5996b18 commit 6957780
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -117,8 +117,8 @@ If EasyRec is useful for your research, please cite:

### Join Us

- DingDing Group: 32260796. (EasyRec usage general discussion.)
- DingDing Group2: 37930014162, click [this url](https://qr.dingtalk.com/action/joingroup?code=v1,k1,oHNqtNObbu+xUClHh77gCuKdGGH8AYoQ8AjKU23zTg4=&_dt_no_comment=1&origin=11) or scan QrCode to join![new_group.jpg](docs/images/qrcode/new_group.jpg)
- DingDing Group: 32260796. click [this url](https://page.dingtalk.com/wow/z/dingtalk/simple/ddhomedownload?action=joingroup&code=v1,k1,MwaiOIY1Tb2W+onmBBumO7sQsdDOYjBmv6FXC6wTGns=&_dt_no_comment=1&origin=11#/ ) or scan QrCode to join![dinggroup1.png](docs/images/qrcode/dinggroup1.png)
- DingDing Group2: 37930014162, click [this url](https://page.dingtalk.com/wow/z/dingtalk/simple/ddhomedownload?action=joingroup&code=v1,k1,1ppFWEXXNPyxUClHh77gCmpfB+JcPhbFv6FXC6wTGns=&_dt_no_comment=1&origin=11#/) or scan QrCode to join![dinggroup2.png](docs/images/qrcode/dinggroup2.png)
- Email Group: [email protected].

### Enterprise Service
Expand Down
Binary file added docs/images/qrcode/dinggroup1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/images/qrcode/dinggroup2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed docs/images/qrcode/new_group.jpg
Binary file not shown.
6 changes: 3 additions & 3 deletions easy_rec/python/loss/jrc_loss.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# -*- encoding:utf-8 -*-
# Copyright (c) Alibaba, Inc. and its affiliates.
import logging

import numpy as np
import tensorflow as tf

if tf.__version__ >= '2.0':
Expand Down Expand Up @@ -66,8 +66,6 @@ def jrc_loss(labels,
pairwise_weights = tf.tile(weights, tf.stack([batch_size, 1]))
y_pos *= pairwise_weights
y_neg *= pairwise_weights
else:
assert sample_weights == 1.0, 'invalid sample_weight %d' % sample_weights

# Compute list-wise generative loss -log p(x|y, z)
if same_label_loss:
Expand Down Expand Up @@ -124,4 +122,6 @@ def jrc_loss(labels,
else:
raise ValueError('Unsupported loss weight strategy `%s` for jrc loss' %
loss_weight_strategy)
if np.isscalar(sample_weights):
return loss * sample_weights
return loss

0 comments on commit 6957780

Please sign in to comment.