Update cross_entropy_loss.py
This commit is contained in:
parent
88bf684c61
commit
f5f3d6794e
1 changed files with 1 additions and 1 deletions
|
|
@ -106,7 +106,7 @@ def _large_cross_entropy_forward(
|
|||
if (label_idx >= (col_idx+0)*BLOCK_SIZE) and \
|
||||
(label_idx < min((col_idx+1)*BLOCK_SIZE, n_cols)):
|
||||
|
||||
loss = tl.load(logits_ptr + label_idx).to(tl.float32)
|
||||
logits_label = tl.load(logits_ptr + label_idx).to(tl.float32)
|
||||
lse = 0.0
|
||||
loss = lse - logits_label # We add the final logsumexp after a reduction
|
||||
pass
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue