Skip to content
This repository has been archived by the owner on Nov 17, 2023. It is now read-only.

add pos_weight for SigmoidBinaryCrossEntropyLoss #13612

Merged
merged 25 commits into from
Mar 8, 2019
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
test with random N
  • Loading branch information
eureka7mt committed Feb 18, 2019
commit ba2683adc98756aca453ce2f85e08f12093f3b5f
3 changes: 1 addition & 2 deletions tests/python/unittest/test_loss.py
Original file line number Diff line number Diff line change
Expand Up @@ -424,8 +424,7 @@ def test_poisson_nllloss_mod():
@with_seed()
def test_bce_loss_with_pos_weight():
# Suppose it's a multi-label classification
#N = np.random.randint(5, 30)
N = 10
N = np.random.randint(5, 30)
data = mx.nd.random.uniform(-1, 1, shape=(N, 20))
label = mx.nd.array(np.random.randint(2, size=(N, 5)), dtype='float32')
pos_weight = mx.nd.random.uniform(0, 10, shape=(1, 5))
Expand Down